Click here to Skip to main content
15,891,431 members
Articles
Technical Blog
(untagged)

Make MSI from InnoSetup installer

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
1 Aug 2013CPOL1 min read 29.7K   8   1
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-"
   >
#)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) i-BLADES
Thailand Thailand
I'm Android and Full Stack Software Engineer. 28 years in software industry, lots of finished projects. I’m never afraid of learning something new and you can see it by amount of skills in my resume.

I'm working remotely since 2009, self-motivated and self-organized.

There are no impossible projects. I have experience with Android, iOS, Web, Desktop, Embedded applications, VR, AR, XR, Computer vision, Neural networks, Games, IoT, you name it.

Comments and Discussions

 
Questionabout makemsi (Administrator privileges). Pin
lin9866652123-Aug-15 16:01
lin9866652123-Aug-15 16:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.