/build/static/layout/Breadcrumb_cap_w.png

Uninstall method question

Using this:

-----------------------------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product Where Name = 'Technesis PopUp'")

For Each objSoftware in colSoftware
objSoftware.Uninstall()
Next
----------------------------------------------------------------------

It uninstalls the program, however, there is a popup requesting the user to close all programs etc. Is there a way to suppress posups, or initiate a silent uninstall using the uninstall method?

Thanks

0 Comments   [ + ] Show comments

Answers (5)

Posted by: WiseUser 18 years ago
Fourth Degree Brown Belt
2
Create this VBScript, then drag and drop your MSI on it - it will return the Product code.

Const msiOpenDatabaseModeDirect = 2

Set oInst = CreateObject("WindowsInstaller.Installer")

sDBPath = Wscript.Arguments(0)

Set oDB = oInst.OpenDataBase(sDBPath, msiOpenDatabaseModeDirect)

sQuery = "SELECT `Value` FROM `Property` WHERE `Property` = 'ProductCode'"

Set oView = oDB.OpenView(sQuery)

oView.Execute

Set oRecord = oView.Fetch

InputBox "ProductCode is the following:", "PRODUCT CODE", oRecord.StringData(1)

Set oInst = Nothing
Posted by: Garrett 18 years ago
Orange Belt
0
If you are executing the uninstall from the local computer it might be easier to use msiexec.exe /x. If you are executing the script from another then I don't know of a way to remove the prompt from the vbscript call you are making.


msiexec /x <pathToSource>\TechnesisPopUp.msi /qn
or
msiexec /x {GUID} /qn

/qn will remove any user interaction.

Personally I prefer to use the GUID for uninstalls.

[link]http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/msiexec.mspx[/link]
To remove or uninstall a package, type:
Syntax
msiexec /x {package|ProductCode}

Top of page
Parameters
/x : uninstalls a product.

package : Name of the Windows Installer package file.

ProductCode : Globally unique identifier (GUID) of the Windows Installer package.
Posted by: ixoni 18 years ago
Senior Yellow Belt
0
Thank you Garrett. The reason I went to the script is becasue msiexec is not working. I am getting the popup that indicates the package cannot be opened, verify that it is a valid package etc. I tried with the product name and the product GUID.
I got the GUID from the programs setup.ini file. That should be it, right?
Posted by: Garrett 18 years ago
Orange Belt
0
Possibly, but its hard to be sure. You could test it out real quick by...

  • Installing the application
  • Start -> Run
  • msiexec /x {GUID} (include the braces in the command line)
    Example: msiexec /x {123AB12A-1234-98E9-9213-A123456789E1}


If you run that command and the uninstaller for that app launches then you have the correct GUID.

If it is the incorrect GUID you could try installing Masai and use it to locate the GUID.
Posted by: ixoni 18 years ago
Senior Yellow Belt
0
Thanks for the good info, I did get the GUID to work. Now, using /qn I still get the popup messages to close applications etc..
msiexec /x {123AB12A-1234-98E9-9213-A123456789E1} /qn

So I wonder if this requiers some kind of answer file.
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