Installshield Trouble uninstalling prior versions

64 Views Asked by At

I've searched for this topic and found many posts but none that describe the exact issue I'm having. Our product (which I inherited from another developer) had an InstallScript method (see below) that although it seemed to work for quite a while didn't seem to be called from anywhere, so I added a custom action to call it and put it after the ISSetupFilesExtract step in both the User Interface and Execute Sequences and when I run it it either doesn't work or gives me an error. So here's the script:

export prototype MainApplication_Installing();
function MainApplication_Installing()
begin
Disable(CANCELBUTTON);

SetStatusWindow(-1,"Uninstalling previous versions...");
//Uninstall 3.0.5
LaunchApp("MsiExec.exe","/X{ABA98465-AE8B-49BB-A445-46744EF236C0} /qn");    
//Uninstall 3.1.1
LaunchApp("MsiExec.exe","/X{954ADD40-DFEF-40DD-896A-FF29E5E43FB8} /qn");    

where the /X is the product code of each prior version, but like I said this didn't work, so after a failed attempt to debug the script I tried a different route creating a Major Upgrade where I specified the Upgrade code of each prior version under: Prepare Setup for Upgrade Scenarios->Upgrade Windows Installer Setup->Remove 3.05 - 3.1.1, but that's not working either. When I install the product now it installs it parallel to the older version (I see both in Control-Panel->Uninstall or Change Program.

enter image description here

So which way should I do it and why aren't either of these working?

Thanks in advance!

1

There are 1 best solutions below

0
On

Once your install/uninstall is in the InstallExecuteSequence you can not run another install/uninstall process. This is a limitation with Windows installer that only one MSI process can be running at a time.