msiexec /i installer.msi TRANSFORMS="transform.MST" /qb- /l*v %temp%\SCCM_Appname.log ALLUSERS=1
I used to just copy the install parameters from other people, without learning why they'd chosen them. Some MSI install parameters are not appropriate for use within SCCM, but which ones?
Choosing the right parameters can make your OS and software deployments more robust and can make troubleshooting a lot easier.
The full list of msi parameters on Windows XP can be found at support.microsoft.com/kb/314881.
Let's break down this common install string into it's component parts.
- msiexec /i installer.msi
This should be very familiar to anyone maintaining a Windows environment. The /i tells msiexec to install (or sometimes reconfigure) the package installer.msi.
This tells msiexec to apply the transform file transform.MST. Again, this should be pretty familiar.
There are a number of ways to install an MSI silently, and some are more silent than others! I would argue that any 'silent' install that displays a modal dialog box at the end is not really a silent install and this rules out /qr, /qf, /qn+, and /qb+.
There is no mention of whether /q, /qb, and /qn display modal dialog boxes, but the fact that there is an explicit /qb- which has "no modal dialog boxes" (my emphasis) suggests that they might.
During package deployment we generally don't want the install to prompt the user for any input at all, and /qb- is our only choice here.
- /l*v %temp%\SCCM_Appname.log
The /l parameter tells msiexec to log actions to a file. You can specify a number of things to log, non-fatal warnings, status messages and so on. When you're troubleshooting you probably want everything logged, so we use /l*, the * being the wildcard parameter. The v ensures the logging is verbose.
The other part of this parameter specifies the filename for the logfile. I put my logfiles in the %temp% folder since I know that it exists, and I prefix the name of each logfile with SCCM_ so that it's easier to find them.
If you're having to troubleshoot an MSI deployment, you'll want to know that the %temp% folder is actually the %windir%\temp folder.
When SCCM installs a piece of software the install normally runs under the LocalSystem account. This can cause problems with poorly created MSI files as described in the following support article-
The ALLUSERS property value must be defined if Windows Installer is trying to install as a user who differs from the locally logged-on user.
The article suggests using ALLUSERS=2, but other MSDN articles suggest otherwise. This article states that-
An ALLUSERS property value of 1 specifies the per-machine installation context.
-which seems like the right option for SCCM 2007. SCCM 2012 might cause a rethink!