This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Registry Key Value
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 07, 2010
12:30 AM
Registry Key Value
how to find the key value from registry through scripting:
Example:
HKEY_CURRENT_USER\Software\7-Zip\Path
"InstallDir" is a key name & i need to read this value
Example:
HKEY_CURRENT_USER\Software\7-Zip\Path
"InstallDir" is a key name & i need to read this value
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 07, 2010
02:34 AM
A simple vbs example:
Function Get7zDir()
On Error Resume Next
Dim objReg
Set objReg = CreateObject("WScript.Shell")
Get7zDir = objReg.RegRead ("HKCU\Software\7-Zip\Path\InstallDir")
End Function
However, are you sure you're looking for the right key/entry? "Path" is an entry and has value like "C:\Program Files\7-Zip". So I would use
Get7zDir = objReg.RegRead ("HKCU\Software\7-Zip\Path")
BTW: you can also use the AppSearch and RegLocator tables to read value from registry.
Function Get7zDir()
On Error Resume Next
Dim objReg
Set objReg = CreateObject("WScript.Shell")
Get7zDir = objReg.RegRead ("HKCU\Software\7-Zip\Path\InstallDir")
End Function
However, are you sure you're looking for the right key/entry? "Path" is an entry and has value like "C:\Program Files\7-Zip". So I would use
Get7zDir = objReg.RegRead ("HKCU\Software\7-Zip\Path")
BTW: you can also use the AppSearch and RegLocator tables to read value from registry.