0

We use InstallShield InstallScript projects to create our installers and are looking for a good way to migrate to the WiX Toolset. As far as I know there is no UpgradeCode (as for MSI) to update from an Installshield InstallScript project to a WiX project.

The only solution I found so far is:

  1. manually save configurations
  2. uninstall the InstallScript installation completely
  3. install the WiX installation
  4. apply the saved configurations

Is there a better way?

Letho
  • 48
  • 9
  • Delete the installshield project and swear to never speak of it again. Are you sure there's no UpgradeCode? Can you open the msi that you install with Orca and look at its Property table and see if there's an UpgradeCode listed? You should also be able to implement the "Save and restore configurations" as custom actions in your wix install. – Brian Sutherland May 18 '16 at 14:20
  • I would love to but unfortunately this is not an option. I believed the answer in this [link](https://community.flexerasoftware.com/showthread.php?186641-How-to-get-ProductVersion-UpgradeCode-in-an-Installscript-Project) which says there is no UpgradeCode. I can't because I only generate an EXE incompatible to Orca – Letho May 18 '16 at 15:42
  • You should be able to use installer.exe /b"C:\Path\to\extract" and then check that dir for the msi. it might also be /extract_all:"C:\Path\To\extract" – Brian Sutherland May 18 '16 at 15:51
  • The setup.exe is just a wrapper program *around* an msi. The msi is what is actually installed when you run setup. Setup just allows for some extra stuff like language select and prerequisite packages to be run as well. – Brian Sutherland May 18 '16 at 15:52
  • There should also be some registry entry for your installed product that eventually links up to a formatted upgrade GUID but finding that can be annoying. – Brian Sutherland May 18 '16 at 15:53
  • According to this [help](http://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/IHelpSetup_EXECmdLine.htm) there is no such option for an _InstallScript_ project. It is only available for an _InstallScript MSI_ project. – Letho May 19 '16 at 06:34
  • I also tried to extract the UpgradeCode as explained [here](http://stackoverflow.com/questions/17936064/how-can-i-find-the-upgrade-code-for-an-installed-application-in-c) but there is none for an _InstallScript_ only installation. Neither does [WMIC](https://msdn.microsoft.com/en-us/library/bb742610.aspx) lists the _InstallScript_ installation but it shows all MSI installations. – Letho May 19 '16 at 06:41
  • Oh wow there's actually no msi I see. – Brian Sutherland May 19 '16 at 14:12

1 Answers1

0

Ok after all those comments I think I understand why this is such an issue. Unfortunately I don't think there is a very simple way to do waht you want to do.

I think your method will be the only real way to migrate from this isntallscript setup based installation. There should be some registry entry in HKLM/SOFTWARE/Microsoft/Windows/CurrentVersion/Uninstall that relates to your product. In here there may be a uninstall command which you could read into a Variable from your burn package and pass that value as a property to your msi.

In you MSI you can have 3 custom actions specifically related to upgrading from the installshield product installation. All these tasks should be deferred custom actions so that they can run with administrator elevation. The first task should copy all the configuration settings to a safe place (generally %temp%\ProductConfig\ would be fine). The second part after saving the configuration would run that uninstall command to remove the product, you may need to append /q or something to make it run passively/quietly. Then at the end of the installation you can copy back the configuration files from temp.

Each of the custom actions should run conditionally on whether or not the property you passed in is set to something. I would schedule the copy cofig after InstallInitialize, the uninstall after the copy and the restore before InstallFinalize just to ensure that everything is copied over after the installer puts all the files on the system.

Ideally you would like to get everything to upgrade without the user needing to interact except in a minimal way by clicking next and Install.

I've only dealt with InstallShield enough to know I really don't like it so if someone else knows more and knows of a better way to do it they'll hopefully chime in.

Brian Sutherland
  • 4,698
  • 14
  • 16
  • Thanks a lot for your detailed description I will give it a try. – Letho May 20 '16 at 07:00
  • For others who stumble upon the same problem there is also the possibility to use the _setup.exe_ at _C:\Program Files\InstallShield Installation Information\{**ProductCodeFromIsmProject**}_ to uninstall the product. With everything hidden it will only display one popup: `setup.exe /removeonly /hide_splash /hide_usd /hide_progress` This popup can be disabled using the silent mode with something like this: `setup.exe /removeonly /hide_splash /hide_usd /hide_progress /s /f1"SilentUninstall.iss"` I guess there is a better way but I haven't found it yet. – Letho May 20 '16 at 07:09