View Full Version : How to use UninstallApplication to silently remove Basic MSI app?

05-19-2004, 04:20 PM
My primary app is InstallScript MSI. It installs a second app that was built as Basic MSI. When I remove app #1, I want to silently remove app #2. I've tried using various switches in the szAdditionalCmdLine string but they have all failed - an "invalid command line parameters" window pops up when the UninstallApplication call is executed. If I leave szAdditionalCmdLine blank the call works - but it launches Maintenance mode, not an automatic uninstall, and it isn't silent.

David Thornley
05-20-2004, 08:37 AM
The full set of command line options to msiexec are documented int he online help. I would look at those for reference, but you may be able to do msiexec /x {Product Code} /qn.

I don't recall if the QN will work with X or not. If ti doesn't you may need to use the maintenance mode command line options with QN and set REMOVE=ALL.

05-20-2004, 02:29 PM
What does the UninstallApplication command run - the uninstall string from registry? The uninstall string for my Basic MSI in the registry is "msiexec.exe /i{GUID}", not "msiexec.exe /x{GUID}". So if the command is simply using the uninstallstring, how does one force an uninstall when msiexec is being launched with the /i{GUID} switch?

05-24-2004, 10:25 AM
As David says, the MSI command to perform a silent uninstallation with /i is:

msiexec /i {ProductCode} /qn REMOVE=ALL

---so perhaps try /qn REMOVE=ALL as the argument?