Command Line Arguments

Home » Documentation » Command Line Arguments

This tool supports passing parameters to the embedded setup executable when launching the MSI package.

You can use the Windows Installer tool msiexec.exe to control the installation of an MSI package. The msiexec.exe tool supports a long list of parameters. These parameters can make the MSI package install in silent mode where no user input is required. They can also control if you want to install or uninstall the package.

One of the big advantages of the MSI Wrapper compared to other solutions for converting exe to MSI is that the original setup executable is preserved and embedded in the package. This means that it is the original setup executable that will run and do the actual installation. In many cases it is required that you pass a list of parameters to the embedded setup. We can make the MSI install silently by using the /quiet parameter for msiexec but maybe the embedded setup also needs a parameter to run silently.

Often a setup executable accepts parameters such as /S, /SILENT, or /VERYSILENT to run unattended. Therefore, the MSI Wrapper builds the MSI in a way that you can send these parameters to the embedded setup when you run the MSI via msiexec.

Let have a look at a full command line that does just that.

msiexec.exe /i “MyPackage.msi” /quiet WRAPPED_ARGUMENTS=”/S”

In the command line above the /quiet parameter will tell the Windows Installer to run quietly. Using the WRAPPED_ARGUMENTS=”/S” will send the /S command line parameter to the embedded installer. You can use the WRAPPED_ARGUMENTS parameter to send a full command line with any number of parameters to the embedded installer.

The documentation contains a section for installer frameworks, which lists some common frameworks used to build a setup executable. Knowing the framework used to build the setup executable will give you a good idea of which parameters it will accept.

Encoding of a Wrapped Command Line

Since the wrapped command line is surrounded by quotes, you need to encode your quotes if you want to pass a command line containing quotes. When you need to use a command line with quotes you simply make two instead of one. As an example, I will show you how to specify the printer name of the installed PDF printer by Bullzip. Normally the executable installer accepts a /PRINTERNAME=”My Printer”. In this case, you can pass that to the MSI using this syntax:

msiexec /i "Setup_BullzipPDFPrinter_11_1_0_2596_PRO_EXP.msi" /quiet WRAPPED_ARGUMENTS="/PRINTERNAME=""My Printer"""