/build/static/layout/Breadcrumb_cap_w.png

Need wisescript to find the subkey in a registry

Hi All,

I need to find the subkey in a registry, to be clear i'll explain in detail

HKLM\SOFTWARE\ABC\XYZ\PQR\{aaaaa-djddjkd-ddddada-ddsadad}
where the highlighted is the GUID generated for each install.
In the GUID i have the uninstallstring, so is it possible to can i retrieve the uninstallstring and then can i use it to execute with execute program.

Your help will sincerely appreciated.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: Bula 12 years ago
Yellow Belt
0
Hi,

I think wise cannot do this.

This vbs will find key that you looking for. You can easly modify, for example run section etc.

On error resume next
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set ws = CreateObject("WScript.Shell")
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

var1 = "7-Zip 9.13 (x64 edition)"

For Each subkey In arrSubKeys
tmp = Ws.RegRead("HKEY_LOCAL_MACHINE\" & strKeyPath & "\" & subkey & "\DisplayName" )
tmp2 = StrComp(tmp,var1)
if tmp2 = 0 then
msgbox tmp,,""
end if
Next
Posted by: anonymous_9363 12 years ago
Red Belt
0
If you have WiseScript, you have either WIS or WPS, in which case why not use the built-in capability of Windows Installer (i.e. an MSI) to remove an existing product version?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ