When deploying software in enterprise environments or automated scripts, silent installation is crucial. MSI (Windows Installer) packages support various command-line parameters for unattended installation.
The fundamental command for silent MSI installation is:
msiexec /i "path\to\package.msi" /qn
Key parameters:
- /i: Install package
- /qn: No UI (completely silent)
- /qb: Basic UI
- /qr: Reduced UI
For more control over the installation process:
msiexec /i "C:\install\app.msi" /qn /norestart ALLUSERS=1 INSTALLDIR="C:\Program Files\App"
Additional useful parameters:
- /l*v "install.log": Create verbose log
- /norestart: Suppress reboots
- ALLUSERS=1: Install for all users
- INSTALLDIR: Custom installation path
MSI packages often expose customizable properties:
msiexec /i "setup.msi" /qn ADDLOCAL=Feature1,Feature2 REMOVE=Feature3
This example shows how to:
- Install specific features (ADDLOCAL)
- Remove unwanted features (REMOVE)
To silently remove an MSI package:
msiexec /x {Product-Code-GUID} /qn
Or using the original MSI file:
msiexec /x "path\to\original.msi" /qn
Common issues and solutions:
- Use /l*v for detailed logging when installations fail
- Check return codes (0 for success, 1603 for failure, etc.)
- Verify administrative privileges are available
- Test with /qb before going completely silent
Sample batch script for automated deployment:
@echo off set MSI_PATH="\\server\share\application.msi" set LOG_FILE="%TEMP%\install_log.txt" echo Starting silent installation... msiexec /i %MSI_PATH% /qn /l*v %LOG_FILE% INSTALLDIR="C:\Apps" SERIALNUMBER=12345 if %ERRORLEVEL% equ 0 ( echo Installation successful ) else ( echo Installation failed, check %LOG_FILE% )
When deploying software in enterprise environments or through automated scripts, silent installation is crucial. For MSI packages, Windows provides standardized command line parameters that work across all MSI-based installers.
The most common silent installation command uses msiexec.exe:
msiexec /i "path\to\package.msi" /qn
This performs a basic silent install with no UI and no user interaction required.
For more control over the installation process:
msiexec /i "C:\install\app.msi" /qn /norestart /l*v "C:\logs\install.log"
Key parameters:
- /qn - No UI (completely silent)
- /qb - Basic UI (progress bar only)
- /norestart - Suppresses system restart
- /l*v - Creates verbose logging
- ALLUSERS=1 - Installs for all users
MSI properties can be passed through the command line:
msiexec /i "setup.msi" /qn INSTALLDIR="C:\Program Files\App" COMPANYNAME="Acme Corp"
Example 1: Deploying with SCCM:
msiexec /i "app.msi" /qn TRANSFORMS=":acme.mst" INSTALLDIR="\\server\apps\"
Example 2: Silent uninstall:
msiexec /x "{GUID}" /qn
- Always test silent installs in a non-production environment first
- Use verbose logging (/l*v) to diagnose failures
- Remember that some installers may require admin privileges
- Check for custom actions that might require user input
- Always include logging parameters during initial deployment
- Consider using transforms (.mst files) for complex configurations
- Test both per-user and per-machine installation modes
- Verify digital signatures before silent installation