Command Line uninstall of product

Got a problem you cannot solve? Try here.
Post Reply
JonB
Posts: 3
Joined: Mon Sep 13, 2010 1:39 pm

Command Line uninstall of product

Post 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
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Command Line uninstall of product

Post 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
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
JonB
Posts: 3
Joined: Mon Sep 13, 2010 1:39 pm

Re: Command Line uninstall of product

Post 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
mills
Posts: 814
Joined: Tue Jul 06, 2010 7:10 pm
Location: Honolulu, HI

Re: Command Line uninstall of product

Post 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...
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Post Reply