How to make InstallShield uninstall previous versions? - installshield

I've followed the instructions outlined here, but it doesn't work exactly as I need.:
How to get InstallShield LE to uninstall the existing installation automatically? (apparently this has worked for other people, so it's worth having a look. If it does the trick, be sure upvote #JYelton's answer)
The result of these instructions are that I can install the application without having to uninstall, but now there are 2 separate instances of the application in my Add or Remove Programs window. It doesn't actually uninstall the previous version, it just installs the new version application along-side the previous one.
How can I make InstallShield uninstall previous versions of the application?

Configure the new project to remove the old one by using the Upgrade Paths view: Add a New Upgrade Path, and browse to your previous .msi file to ensure it uses the right Upgrade Code. Then tweak the settings that appear, if necessary; typically they should be correct.

Related

Stop InstallShield installation when Inno Setup is detected

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.
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.
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.
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.

Installshield: Upgrade Windows Installer do not update anything?

I have created an MSI installscript project in Installshield. I went to Project Assistant>Application Files, then added the application files(package) and built Setup.exe to install.
After installed these files, I went back to Project Assistant and added some application files, then i changed the product version for updating. Finally, i built the Setup.exe again. When i run the Setup.exe, the automatic update (Upgrade Window Installer Setup) asked me to update a new version. After finishing, I checked Program Files(x86) and the updating didn't do anything, the old package was still here.
How can i update my new package? Is there any way to disable the Upgrade Window Installer Setup?
Thanks for the help.
In my humble opinion, most likely, you added new files to existing Component with keypath, which didn't change. Also you should check "Add\Remove Programs" snap-in in Control Panel to see if upgrade was applied - there should change version of your product.
So, I recommend you check Components, and re-allocate files to new Components if I had right. Also please read more about Components and Files. Could start from here.
Two words about InstallScript MSI project. From InstallShield documentation: Because this project type uses two different engines, it is more complex than pure InstallScript or Basic MSI installation projects. It is recommended only for advanced users.
So, if possible, use Basic MSI project - it's a bit simpler than InstallScript MSI for begginers.

Installshield 2010 - On upgrade check its already upgraded to certain version

I'm currently updating my installer (Basic MSI) for a program to v5.00.0000. I need InstallShield to check that if it's an upgrade, it must be on at least 4.00.0034.
So if it's not previously installed, it installs ok.
If it's on 4.00.0020, it must return a message to say please upgrade to v4.00.0034 first.
Thanks,
Ian.
Examine the ISPreventDowngrades action and the major upgrade item that finds newer versions, or read up on how to prevent downgrades. You can then copy this approach, tweaking it to instead find and error out on ones less than 4.0.34.

InstallShield minor update - remove previous version

New to InstallShield, I've built a setup project and used the setup file to deploy my app.
Now I need to update the app, here is what I've done:
Increment product version (I tried major minor and build).
generate new upgrade code.
build the setup project.
The installer refuses to install the app because "Another version of this product is already installed...".
How can I get InstallSheild to remove that other version?
Thank you
You should:
Go to "Organize your setup -> Upgrade paths"
Right-click on Upgrade Paths (listed on the left) and then "New Upgrade path"
Now you must select the OLD installation pack, specify details on your own (:
Just in this case, you can increase version on projects (BOTH! In general information on setup, and in Configuration/publish on application)
After increasing, create e new Product Code on General Information (to setup) and build! (:
Hope it helps someone (:
I got the answer: Product code should be changed instead of upgrade code and the assemblies' file version must be incremented as well.

Msiexec: automatic rollback to previous version on installation failure

When installing a .MSI file using msiexec in silent mode, is it possible to automate it such that on installation failure it rollbacks to the previous version? Assuming that on installation an older application version is already installed.
Yes, restoring the old application version via rollback upon an installation failure is actually a built-in feature of Windows Installer, but you need to configure things correctly to get it to work as you require.
Windows Installer rollback will work as you request if you use: 1) a minor upgrade or 2) a properly sequenced major upgrade that uninstalls the older versions after successfully updating all files. If the major upgrade is set to uninstall the old version before installing the new, the rollback is not available since the uninstall is already over, and the new installer will hence leave nothing installed if it fails and rolls back.
Important: For minor upgrades and for late uninstall of old version in major upgrades to work correctly, all MSI component rules must be followed 100% accurately.
When thinking about a major upgrade that uninstalls the old version after updating, you can view it as a patching operation without having the update packaged as a patch. Windows Installer will actually run a diff on the old and new version and then implement only the required changes, leaving the rest of the application untouched. Depending on the application structure and number of files, this can be significantly faster to install as well.
Late-sequenced major upgrades are also a way to prevent configuration files from being reverted to their original installation status during upgrades. This is a classic issue where config files are changed after installation, uninstalled during a major upgrade and then being reinstalled giving the impression that they are reverted, when they are actually freshly reinstalled.
I have written about Windows Installer Rollback before. Might be worth a read.
No, this is not possible. A major upgrade uninstalls the old version before installing your new one. So when the new install fails, the old version is already removed.
There is a possibility but it involves changing the upgrade sequence which is not always an easy thing to achieve. You should move the RemoveExistingProducts after InstallExecute action
http://msdn.microsoft.com/en-us/library/windows/desktop/aa371197(v=vs.85).aspx

Resources