/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

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
Answered 10/05/2011 by: Bula
Yellow Belt

Please log in to comment
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?
Answered 10/05/2011 by: VBScab
Red Belt

Please log in to comment