GUID of an installed application
Hi,
I am trying to programatically uninstall a product which is already installed. Since I am very new to this, I could find only one way so far
msiexec /x {GUID}
So, now, I would like to find the GUID of that product programatically...
Can any one help me how to find the GUID of the product programatically..
If there is any other way to do this, could you please help me?
Thanks in advance
rk
I am trying to programatically uninstall a product which is already installed. Since I am very new to this, I could find only one way so far
msiexec /x {GUID}
So, now, I would like to find the GUID of that product programatically...
Can any one help me how to find the GUID of the product programatically..
If there is any other way to do this, could you please help me?
Thanks in advance
rk
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
Garrett
20 years ago
Here is the code from the Microsoft Script-o-Matic tool. Found here:http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=9ef05cbd-c1c5-41e7-9da8-212c414a7ab0
If you need help with the rest of the VB code let me know.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product",,48)
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
Wscript.Echo "InstallDate: " & objItem.InstallDate
Wscript.Echo "InstallDate2: " & objItem.InstallDate2
Wscript.Echo "InstallLocation: " & objItem.InstallLocation
Wscript.Echo "InstallState: " & objItem.InstallState
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "PackageCache: " & objItem.PackageCache
Wscript.Echo "SKUNumber: " & objItem.SKUNumber
Wscript.Echo "Vendor: " & objItem.Vendor
Wscript.Echo "Version: " & objItem.Version
Next
If you need help with the rest of the VB code let me know.
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product",,48)
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
Wscript.Echo "InstallDate: " & objItem.InstallDate
Wscript.Echo "InstallDate2: " & objItem.InstallDate2
Wscript.Echo "InstallLocation: " & objItem.InstallLocation
Wscript.Echo "InstallState: " & objItem.InstallState
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "PackageCache: " & objItem.PackageCache
Wscript.Echo "SKUNumber: " & objItem.SKUNumber
Wscript.Echo "Vendor: " & objItem.Vendor
Wscript.Echo "Version: " & objItem.Version
Next
Posted by:
gpallirk
20 years ago
Hi Garrett,
Thanks a lot for this help.. It really helps me identifying the GUID..
[:D]
Is it possible to return something back to the the DOS script(CMD) with a specific IdentifyingNumber where we can run the command
msiexec.exe /x {GUID}
I mean, may be I am asking the rest of the script!!
Thanks again for your help
Ramki
Thanks a lot for this help.. It really helps me identifying the GUID..
[:D]
Is it possible to return something back to the the DOS script(CMD) with a specific IdentifyingNumber where we can run the command
msiexec.exe /x {GUID}
I mean, may be I am asking the rest of the script!!
Thanks again for your help
Ramki
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.