1
votes

I am trying to migrate from InstallShield to Inno Setup. I have all setup but I got stuck on a single case when the user might downgrade from Inno Setup back to the InstallShield. I need InstallShield to fail the installation or at least warn the user to uninstall Inno Setup version first manually (otherwise I get two versions installed and things get messed up).

I CANĀ“T of course change the existing InstallShield installers in any way since they have already been released. Solution must come from Inno Setup. Any ideas how this could be done? I understand this might me impossible.

3

3 Answers

0
votes

A stock InstallShield template automatically authors a prevent downgrade rule into the MSI. Assuming your InnoSetup project was created using the same UpgradeCode as the InstallShield project this should work automatically.

If you gave your new InnoSetup project a new UpgradeCode GUID and authored a remove legacy product type rule using the old GUI in the Upgrade table there really isn't much InstallShield could possibly do. That's the nature of installers... once it's shipped it's shipped.

0
votes

I do not think this can be done. The Inno Setup does not use the Windows Installer, so the InstallShield won't even know that your product is already installed. And Inno Setup uninstaller cannot know that the InstallShield installer is starting.

The best what you can do is to have your Inno Setup installer remove the InstallShield installation and install itself to another folder. So when you re-install the InstallShield installation, it at least won't conflict/break the Inno Setup installation. And user will be able to correctly uninstall the new Inno Setup installation, if needed.

0
votes

OK I solved it. (kind of)

There is a simple trick what you can do to trick the InstallShield to think it is already installed even if it is not.

First you need to locate all the registry entries with your UpgradeCode and ProductCode (it should be 3 entries for the UC and 5 for the PC) normally created by the InstallShield. Also note that both GUIDS are stored in the registry in reversed form (first 8 chars are backwards!!! - rest I am not sure of but it can be googled).

Now you need to make the InnoSetup recreate this registry entries. When InstallShield starts it looks for existing version in the registry, if it finds one it tries to uninstall it using the copy of the original installer - path to the copy is stored in the registry at

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products{reversed guid of product code}\InstallProperties]

"LocalPackage"="C:\Windows\Installer\[random string].msi"

If InstallShield wont find this file it will fail. You can also create your own MSI file which will call the uninstall.exe file from InnoSetup.