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
0 Comments   [ + ] Show 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.


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
Answered 10/04/2004 by: Garrett
Orange Belt

Please log in to comment
Hi Garrett,
Thanks a lot for this help.. It really helps me identifying the GUID..
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
Answered 10/05/2004 by: gpallirk
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity