Page 1 of 1
Command Line uninstall of product
Posted: Tue Sep 21, 2010 8:40 am
by JonB
Is there a standard practice for uninstalling on command line without distributing a copy of the .exe or gpo .msi file? I ask because it's become somewhat standard practice with our deprecated msi install to uninstall using the product ID using "msiexec /x <guid>". This is easy for administrators to run. However, this does not appear to be possible with the .exe, and the product ID in the GPO msi file does not appear to be configurable without adding a manual process of modifying the output MSI. I've created a .bat file to read the registry and call the path on the local .exe file uninstall, but again that's another file we'd have to distribute. If there's a single command to uninstall on command line that would work globally like we have with our old installer that would be ideal.
Is this possible?
Thanks,
Jon
Re: Command Line uninstall of product
Posted: Tue Sep 21, 2010 10:45 pm
by mills
You could create a variable to pass to a single exe through command line that would trigger an uninstall.
Check the help topic "Setup Command Line Parameters".
For group policy, consider:
http://www.appdeploy.com/messageboards/tm.asp?m=27662
Re: Command Line uninstall of product
Posted: Wed Sep 22, 2010 8:29 am
by JonB
Thanks Andy,
So I gather it's not possible to uninstall via command line without knowing the path to the local cached copy of the .exe or providing the .exe for the uninstall. It's not a show stopper because there's some workarounds (like a .bat file in a known location that gets the path and uses "REMOVE=TRUE /s", or register my own uninstall program that does the same thing). I was hoping that msiexec would work on the guid; running msiexec -i {guid} actually brings up the user interview, but gives me an error when I try to use that commandline with REMOVE=TRUE...
Jon
Re: Command Line uninstall of product
Posted: Thu Sep 23, 2010 10:27 am
by mills
How about creating your own executable with IA (not to act as an installer).
Create a new project, type = blank. You could create a dialog that accepts a GUID as input (or accepts a GUID from command line) and runs (Un)InstallMSI...