Working with Microsoft Windows Installer packages¶
Windows Installer is an operating system service developed by Microsoft to improve program installation and uninstallation, simplify software deployment in corporate environments, and resolve common issues such as shared DLL conflicts. To fully utilize its features, your application must be "Windows Installer aware," which requires planning for installation during development. For example, enabling just-in-time installation of application components involves using a specific API. Windows Installer was previously known as "Microsoft Installer" (MSI).
If you need to package an MSI setup into a single self-installing executable file or create an MSI bootstrapper/loader, you can use Paquet Builder.
Paquet Builder includes a dedicated Setup Execution page and custom actions to run MSI setups or MSP updates/patches. These features can optionally verify the presence of the Windows Installer runtime (redistributable version) and handle missing components.
Steps to Create an MSI Setup Package¶
- Start by creating a Package for Setup.
- In the "Choose Setup Program" panel, select "Install a Windows Installer package (MSI) or patch (MSP)."
Then select the MSI or MSP file you wish to run:
-
Enable "Use a fixed name for the temporary folder":
Windows Installer remembers the folder containing source files. Setting a fixed name ensures the temporary folder is consistent, allowing Windows Installer to locate files quickly for repairs or updates. -
To run multiple MSI setups consecutively or handle prerequisites, use custom actions.
You can use multiple "install MSI setup" custom actions to manage several MSI files and validate installations through exit codes.
Running Advanced MSI Actions (Administrative Installations, Advertising Products)¶
Advanced MSI actions, such as administrative installations or product advertising, are possible using the "install MSI setup" custom action.
Compressing Windows Installer MSI Files with 7-Zip¶
Paquet Builder allows you to significantly reduce the size of your MSI and CAB files using 7-Zip compression methods like LZMA2 and BCJ2. To achieve this:
-
Disable compression for CAB files:
Set theCompressionLevel
to "none" for Media (Wix Media Schema). -
Keep CAB files external to the MSI file:
Ensure CAB files are not embedded within the MSI file. -
Add MSI and CAB files to Paquet Builder's file manager:
Paquet Builder will compress these files using 7-Zip, resulting in a significantly smaller distribution size due to the superior compression performance of LZMA over LZX (used in Cabinet format).
Additional Resources¶
For more information about Microsoft Windows Installer: