This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Uninstall another msi packages
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2016
05:53 AM
Uninstall another msi packages
Hi,
I'm working on a setup.exe which shall uninstall some older versions of different programs before starting the actual installation process.
I've implemented this with some CAs in the "Installation/User Interface" sequence, and it worked fine.
The problem is that the setup.exe shall be executed in silent mode.
I didn't manage to place the CAs for uninstall in the "Installation/Execute" sequence in a way, that they are properly executed.
Maybe you can help me?
Many Thanks
I'm working on a setup.exe which shall uninstall some older versions of different programs before starting the actual installation process.
I've implemented this with some CAs in the "Installation/User Interface" sequence, and it worked fine.
The problem is that the setup.exe shall be executed in silent mode.
I didn't manage to place the CAs for uninstall in the "Installation/Execute" sequence in a way, that they are properly executed.
Maybe you can help me?
Many Thanks
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2016
01:39 PM
Why CAN'T you place them in the "Installation/Execute" sequence? That would solve the problem of them running while in silent mode..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2016
08:06 AM
The initial problem, was that the execution of the CA was stopped with the error message 1618: "Another installation is already in progress"
After changing the Return Processing to "Asynchronus (no wait)" the CAs are execute.
Now I have to check, if the asynchronus execution causes other problems during the subsequent install process.
Thanks for your question and your though-provoking impulse.
After changing the Return Processing to "Asynchronus (no wait)" the CAs are execute.
Now I have to check, if the asynchronus execution causes other problems during the subsequent install process.
Thanks for your question and your though-provoking impulse.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 22, 2016
09:44 AM
Ive done a custom MSI uninstallation of multiple packages with a Custom Managed Code action. I use c# to run a WMI query for certain package names, then run their uninstall command stored in the registry.
[CODE]
string searchString = "SELECT * FROM Win32_Product WHERE Name LIKE 'my-app';
ManagementObjectSearcher mos = new ManagementObjectSearcher(searchString);
foreach (ManagementObject mo in mos.Get())
{
// Will return Name, IdentifyingNumber and Version
try
{
if (mo["Name"].ToString().Contains("my-app"))
{
//object arp = mo.InvokeMethod("Uninstall", null);
Process process = new Process();
process.StartInfo.FileName = "msiexec.exe";
process.StartInfo.Arguments = "/X" + mo["IdentifyingNumber"].ToString() + " /q";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = false;
process.Start();
process.WaitForExit();
}
}
catch (Exception ex)
{
//this program may not have a name property, so an exception will be thrown
//handle your exception here
}
}
[/CODE]
[CODE]
string searchString = "SELECT * FROM Win32_Product WHERE Name LIKE 'my-app';
ManagementObjectSearcher mos = new ManagementObjectSearcher(searchString);
foreach (ManagementObject mo in mos.Get())
{
// Will return Name, IdentifyingNumber and Version
try
{
if (mo["Name"].ToString().Contains("my-app"))
{
//object arp = mo.InvokeMethod("Uninstall", null);
Process process = new Process();
process.StartInfo.FileName = "msiexec.exe";
process.StartInfo.Arguments = "/X" + mo["IdentifyingNumber"].ToString() + " /q";
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardInput = true;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = false;
process.Start();
process.WaitForExit();
}
}
catch (Exception ex)
{
//this program may not have a name property, so an exception will be thrown
//handle your exception here
}
}
[/CODE]