\Windows Installer FAQ (the basics)Bootstrapper EXE Programs
Windows Installer Basics: Bootstrapper EXE Programs |
Windows Installers have a ".msi" file extension which is associated
to the "MSIEXEC.EXE" program
(to perform the installation).
It is reasonably common for people or toolsets to create files with
".exe" extensions, these will at runtime unpack the imbedded ".msi"
(and possibly other files) and then invoke the windows installer process.
If that is all it did then you'd have to wonder why do it, typically they
also work around some form of Windows Installer limitation.
Bootstrapper's must also support a command line which is capable of
receiving (and passing on) all normal "MSIEXEC.EXE" switches), ones that
don't make creation of transforms or property configuration
difficult or impossible.
Bootstrapper's should not prevent someone from extracting the MSI and
running it directly (the invoker may need to do some minimal preparation).
Under Vista and newer operating systems you may need to sign your
EXE files for them to install correctly.
Some common reasons for a bootstrapper:
- Install Windows Installer support.
The destination may not have Windows Installer at all or may not
have the version the msi requires.
In general I recommend not relying on new features from the latest
version and avoiding this issue altogether.
- Install support for other products such as
DirectX, Internet Explorer, .NET, MDAC etc.
- You need to install other products that are packaged as MSIs,
Windows installer can't install two products (nest)
at the same time.
- You may wish to specify logging level, set the
UILevel property or do
other things that must be setup outside of the actual install.
- You may wish to automatically apply a language
transform to the MSI based on the users language settings.
- You could end up with a smaller package with less files.
One setup EXE could contain the MSI plus many supporting files.
The EXE generally holds these is a compressed format so could save
space and may perform an CRC or MD5 check to ensure contents are
intact before launching the install.
There are many tools which create self extracting archives, some of
these allow invokation of one of the files, and example is the 7ZIP command
line program "7za.exe".
The Windows Installer SDK contains "msistuff" which you should have a look at.
Some boot strap links:
Some things you will need to think about:
- How easy is it to build the launcher EXE
(can it be an automated part of the MAKEMSI build)?
- Does it need any sort of user interface?
- Where to extract files to (temporary or "common" directory)?
Should they remain there after install (repair of MSI may require)?
Will uninstall remove them?
You should read the "source availability" section.
- How will "MSIEXEC.EXE" parameters be passed to
the install of the main (and possibly other) MSI files?
For example how will users create and apply
transforms?
- How will you handle errors and return codes from all processes
including the main MSI installation? What will you do with the
"3010"
(reboot) return code and possibly other trickier ones?
Perhaps you will keep plowing ahead ignoring all problems like
most launchers...
- Do you need your launcher code to be invoked at uninstall?
If so you will probably need to "hide" the Windows Installer
"uninstall" information and add you own so that the
"Add/Remove Applet" will work correctly...
- What documentation will you supply to allow people to bypass your
launcher to cover off deployment situations that don't support
EXE based installation?
- Under Vista and newer operating systems you may need to sign your
EXE files for them to install correctly.
Adrian Accinelli's response
to a newsgroup post titled "Writing Custom Bootstrapper Options" (2 Feb 2008)
is quite good and I'd recommend reading it.
It mentions the word
"manifest"
which I hadn't realised was a current term (for the "pay load").