In Part 1 of this series, we discussed the challenges an InstallShield based installer presents administrators. In Part 2, we described ways to identify that a given installer is based on the InstallShield technology. In Part 3, we discussed how to determine what is going on inside the installer, to help you figure out how to construct a command line to run it silently. In Part 4, we talked about the recording and playback option. In Part 5, we looked at executables with embedded executables. In Part 6, we look at executables that contain embedded MSI installers and how to silently install those.
Executable with Embedded MSI
It is very common for InstallShield installers to launch as an executable and then extract an MSI which does the heavy lifting. In these cases, Process Explorer will show the MSIEXEC.EXE process running underneath the Setup.exe. The InstallShield command line syntax makes it possible to pass parameters on to the underlying MSI if needed. This is done through the “/v” switch. The “/v” switch is similar in function to the “/a” switch used with installers that have embedded executables. For example:
Setup.exe /s /v/qn /norestart
This command line tells the outer Setup.exe program that it is to run silently. The “/v” instructs it to pass the rest of the command line on to MSIEXEC when it runs the embedded MSI. The “/qn” is an MSIEXEC switch to run silently. The “/norestart” switch tells MSIEXEC not to reboot the machine, even if the installer wants to reboot.
In addition to passing the “/qn” switches on to the MSI, it is also possible to pass long parameter values and even transform files if they are available. Think of the “/v” as saying “add everything after me to the MSIEXEC command line”. For example, to specify ALLUSERS=1 to the MSI in the above example, use:
Setup.exe /s /v/qn /norestart ALLUSERS=1
Any of the valid MSIEXEC switches can be specified after the “/v”. Some commonly used MSIEXEC switches include:
|/qn||Install silently with no progress indicators|
|/qb||Install with a progress indicator but no user interaction|
|/norestart||Do not reboot, even if the installer wants to.|
|/update “patch.msp”||Apply the patch.msp patch during installation|
|/log “install.log”||Log details about the installation to “install.log”.|
For more information on the available switches, launch a command prompt and enter “MSIEXEC /?” to view the detailed help for MSIEXEC.
In Part 7, we will look at the “Extreme” cases of InstallShield installers. These are situations where the person who created the installer decided to do build a Setup.exe that calls another Setup.exe which in turn runs an MSI. These installers can often be silently run as well, but the command lines can be a bit strange looking.