1

I have an old installer that is made with InstallShield 2015, its non-MSI based (I tried opening it with 7zip and could not --> non-MSI based, am I right?). In general, I need to stop using InstallShield and migrate to Wix.

  1. Is it possible some how to convert InstallShield it to Wix?
  2. Using Wix, I need to detect if a previous version (the InstallShield version) is currently installed and automatically uninstall it and then continue with the normal Wix process. Is such a thing possible?

Thank You :-)

Refael Sheinker
  • 713
  • 7
  • 20
  • 1
    The installer, is an EXE or are you talking about a .ism InstallShield project file? I don't think using 7-zip to evaluate if this is an msi is viable. I would attempt to use a command line to see if I can extract the package from the EXE. Try running your setup with the `\a` flag to see if it extracts the package for you. – Daniel Lee Oct 26 '17 at 15:06
  • 1
    Another thing to check if this application is already installed on a test system, look in the registry for the uninstall key. That should tell you if it is a MSI install. Check `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall`, or the 64bit registry key if it is a 64bit install. – Daniel Lee Oct 26 '17 at 16:10
  • 2
    If it's an executable it could still be an exe that contains an MSI file. That's what you should verify because if it really is MSI-based then you can just do a major upgrade. That uninstall key may contain an uninstall string and a guid, these would indicate it's an MSI install. – PhilDW Oct 26 '17 at 18:31
  • 1
    For extracting various InstallShield-built bootstraps, see [Programmatically extract contents of InstallShield setup.exe](https://stackoverflow.com/questions/8681252/programmatically-extract-contents-of-installshield-setup-exe/8694205#8694205). Depending on the kind of installer, your options to include it in WiX will differ. – Michael Urman Oct 27 '17 at 13:39
  • @DanielLee Its an .ism project file that creates an exe file named `BTSetup.exe`. Using `\a` I got this: `The setup command line is invalid. The setup cannot proceed.`. I managed to extract an MSI file, kinda. I did this: `BTSetup.exe /silent /stage_only ISRootStagePath="c:\bbb"` and this extracted a file called `setup.exe` and then I did this: `setup.exe /s /x /b"c:\ccc" /v"/qn"` and this produced an MSI file called `foobar.msi`. I extracted the UpgradeCode from it to do a `MajorUpgrade` in Wix, but it did not work. Also, this UpgradeCode was different from the one in the .ism file. – Refael Sheinker Oct 29 '17 at 07:14
  • @DanielLee I found it in the registry path you suggests: `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\W‌​indows\CurrentVersio‌​n\Uninstall`. What did you mean by `or the 64bit registry key if it is a 64bit install`? My system is indeed an x64 system. Also, I tried using the uninstall string (`MsiExec.exe /X{89601025-B6CB-49AC-9816-D1948AED5C14}`), it did deleted the proper files from program files, it also removed shortcuts from the Start menu, but, it left an entry in the Add/Remove programs thingy. Any advise please? – Refael Sheinker Oct 29 '17 at 07:28
  • @DanielLee Can I say for sure that its an MSI based install because the uninstall string executes `msiexec`? – Refael Sheinker Oct 29 '17 at 07:29
  • @MichaelUrman Thank You! Thank You! Thank You! It helped a lot! – Refael Sheinker Oct 29 '17 at 07:30
  • A 64bit application install will store its installation keys without the 'Wow6432Node" path. Yours must be a 32bit install. – Daniel Lee Nov 01 '17 at 19:05

1 Answers1

1

I'll add a quick answer for reference, though the problem appears solved already.

  1. If the old Installshield setup is an MSI, you can use dark.exe from the WiX toolkit to "disassemble" an MSI into WiX source code (dark.exe can also decompile WiX setup.exe bundles - there is a somewhat messy description of this here: How can I compare the content of two (or more) MSI files?).

    • After some cleanup you can compile the WiX source to a new WiX-built MSI. A bit of knowledge and experience is needed for the cleanup to be successful (eliminating GUI sections, add a WiX GUI, realign source paths, clean up binary stream tables, etc... - not trivial, but not rocket science :-).

    • If the old setup was a legacy installer (not MSI), you can convert it to MSI by using a repackager tool to capture changes done to the system during installation and convert them to an MSI. A lot of knowledge is required to clean up such a capture. If you know the product it is often better to code a new setup "by hand". Or if you are in a large corporation chances are you will have a "repackaging team" available somewhere who will have the expertise to do this job for you.

  2. Yes, old setups can be uninstalled as part of your new MSI.

    • As you discovered if the old setup was an MSI you can simply use a major upgrade to remove it during the new WiX install.

    • If the old version was a legacy setup things can get considerably more involved often requiring you to "record" a dialog response file to feed to the uninstaller function of the old setup.exe file. Not at all trivial, and quite error prone. Incidentally one of the major benefits of MSI is the completely suppressible GUI.

    • For reference, here is an old answer with information on dealing with the infamous setup.exe files that we frequently have to uninstall and upgrade: How can I use powershell to run through an installer? The setup.exe can be many different things: Installshield Setup, Advanced Installer Setup, Inno Setup, Self-Extracting Zip-Archive, a proprietary setup format, the list goes on...

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164