Edited by gmpk82, 18 April 2014 - 07:04.

how to support downgrade in Installshield basic msi project
Posted 15 April 2014 - 04:52
Posted 18 April 2014 - 20:37
I implemented this, but I don't have access to the source files now.
As far as I recall what I did was to configure the upgrade table to uninstall any version of the application on the box, and then to set a custom REINSTALLMODE to ensure that all "older files" get installed after a major upgrade placed early in the InstallExecuteSequence had uninstalled the newer verson.
The big problem with this sort of downgrade is that MSI in general will refuse to install files that have lower versions than those that are on disk. The process of FileCosting (standard action in the InstallExecuteSequence) takes care of determining what files should be installed and what files should not. Setting a custom REINSTALLMODE will change the default handling of how MSI replaces files, making it possible to install files older than those found on disk.
I don't like this sort of "hack" because there are unforeseeable consequences for advanced installation scenarios such as IIS, GAC, WinSxS and those kinds of things.
One way to really "hack" it is to have a custom action delete the whole installation folder as one of the first steps in the InstallExecuteSequence and condition this custom action to run only on major upgrade (UPGRADINGPRODUCTCODE is the conditon). You can also enable it with a property set at the command line. For example ALLOWDOWNGRADE. I wouldn't recommend any of this.
Finally; you can create your own setup.exe wrapper that will first uninstall the new version and then install the older version. This is the safest approach in my opinion, but it requires that the setup is delivered as an EXE file.
Looking over this "answer" I kind of feel like deleting it since the only recommendable solution is the last one. Everything else is sort of crazy, but possible. I will leave it as it is, some advice from experience is better than none, but be careful. I only recommend using a setup.exe when it comes down to it.
Edited by Glytzhkof, 19 April 2014 - 22:50.
-Stein Åsmul
Posted 21 April 2014 - 09:26
very very informative reply , thanks much. 2 days back I prepared a VB script for this issue as explained in the FINAL way in ur reply. I have 2 chances here one is to provide additional VB script or .exe and second one is to reject my internal customers requirement by saying it is Installshield limitation.
once again thanks.
Posted 21 April 2014 - 13:08
This is actually a Windows Installer limitation - it is Windows itself that is designed this way.
Messing automatically with REINSTALLMODE is quite dangerous since it applies to every file that is due for install. This could overwrite even system files, though Windows has been changed these days so that this is more likely to cause a runtime error than a downgrade. It is only safe to define to overwrite any file version if you have no system files in your setup. That's almost never the case if you are including any merge modules.
Edited by Glytzhkof, 21 April 2014 - 23:41.
-Stein Åsmul