cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Abhijit
Level 2

Running silent install and uninstall without any parameters

Hi,

I have developed a basic MSI package in Installshield. To make it install silently, I have included the MSI command line argument "/qb+" while building only. This installs it silently as expected.

However when I execute the same EXE again with the intention of uninstalling the previously installed components, it actually does a Reinstall or Repair but not a Uninstall. I would like to launch the same EXE for installation and then for uninstallation. Is it possible?

Regards,
Abhijit
Labels (1)
0 Kudos
(1) Reply
Shuttledude
Level 7

Here's a code snippet that I use in a Visual C# "Install Wizard" that will show you how to programmatically uninstall a Basic MSI app:

// This is how to uninstall a basic msi app

// Create the uninstall process.
Process proc = new Process();

// Define the parameters for the process
proc.StartInfo.FileName = "msiexec.exe";

// This is the Product Code from your Basic MSI InstallShield Project
string strProdGUID = "{E50249BB-2FBC-4EE1-A7A8-F4A5E45F5FD8}";

proc.StartInfo.Arguments = "/uninstall" + " " + strProdGUID + " " + "/qb";

// Start the process.
proc.Start();

// Wait for the uninstall process to end.
proc.WaitForInputIdle();
proc.WaitForExit();

// Release resources.
proc.Close();


You're welcome! 😄
0 Kudos