Make MSI from InnoSetup installer





0/5 (0 vote)
How to make an MSI from InnoSetup installer.
Last time, my company customers asked for an installer in Windows Installer MSI format. My company product is a complex system containing thousands of files and plenty of tasks. It cannot be quickly ported to other installer systems. But the result needed to be ASAP.
Windows installer is a complex product too, and even Microsoft made an open source XML based project Wix to simplify tasks. Another good project is MakeMsi, which uses simple text files to describe tasks.
I found MakeMsi reach featured and easy to use. First what you will need is to download and install MakeMsi. The second thing is to look for samples. Copying the TryMe sample is a good point to start. Files TryMe.mm and Try.ver are enough for a beginning. Right click on TryME.mm in Explorer and choose Build MSI. It will generate a sample MSI installer file.
What we need next is to change some properties in the source files to change the labels on the result installer. If you see something not in your source files, you can search the MakeMsi folder and copy any files to your source directory and change them. When everything looks great, we can go to run our old InnoSetup installer.
First, what I try to use is a Binary Table to store the old installer, it works well for a generic executable, but seems to have issues with InnoSetup. I have to choose copying the old installer to a temporary folder and executing from the MSI installer.
<$DirectoryTree Key="INSTALLDIR"
Dir="c:\program files\YourProduct" CHANGE="\" PrimaryFolder="Y">
<$Directory Key="TMP" PARENT="TempFolder" Dir="inst" >
<$Files "YourProduct.exe" DestDir="TMP">
#(
<$ExeCa
;; Binary="YourProduct.exe"
EXE="[TMP]YourProduct.exe"
Args=^/SP- /SILENT /SUPPRESSMSGBOXES /LANG=English /NOCANCEL /DIR="[INSTALLDIR]"^
Description="Performing installation"
CONDITION=^<$VBSCA_CONDITION_INSTALL_ONLY>^
Type="Deferred System Sync"
Rc0="N"
Seq="InstallODBC-"
>
#)