How do I create an MSI wrapper over EXE installation files?

TipThe easiest approach is to follow our related Convert EXE to MSI - Create an MSI package from EXE tutorial.

ImportantThe following article uses options that are available starting with the Professional edition and project type.

The recommended approach when creating an MSI installer for an application that comes in a different installer package file format is to repackage it. This allows you to fully utilize Windows Installer technology. However, there may be times when you only need to wrap the EXE file into an MSI wrapper without repackaging it, for which you can use install arguments.

In order to exemplify the procedure, we will assume to wrap three EXE installers "one.exe", "two.exe" and "three.exe" into a MSI. Steps for creating an MSI wrapper over EXE:

1. In Product Details Tab (Product Details Page) under the "Add or Remove Programs (Control Panel)" group, uncheck the "Register product with Windows Installer" option. We don't want the wrapper to appear in "Control Panel" -> "Add or Remove Programs" as an installed program.

Ai register with windows installer

2. Go to Files and Folders Page - Installer Project and add the EXE installers in the "Application Folder".

Ai exe filesandfolders

3. Create a BAT file (e.g. Your_File.bat) with the following content and add it in the Files and Folders Page:

%1
%2
%3

4.  In the Custom Actions Page add a "Launch file" custom action after the "Finish Execution" action group from "Install Execution Stage":

  • In the "Properties" group on the right pane set the "File to Launch" field to: "[#Your_File.bat]"
  • In the "Command Line" field set this: "[#one.exe]" "[#two.exe]" "[#three.exe]"
  • Disable all options from the "Execution Options" group.
  • Enable only the "Install" option from the "Execute Sequence Condition" group.

NoteYou can create a similar custom action for uninstall as well.

TipOptionally, because this is a wrapper installer, in the Install Parameters, the interface can be switched to a limited view. Also, to get a starting point on hiding the BAT command window, you can follow our related How to hide the command window of a custom action? article.