Подія
29 квіт., 14 - 30 квіт., 19
Приєднайтеся до кінцевої віртуальної події Windows Server 29-30 квітня для глибокого занурення технічних сесій і live Q&A з інженерами Microsoft.
Зареєструватися заразЦей браузер більше не підтримується.
Замініть його на Microsoft Edge, щоб користуватися перевагами найновіших функцій, оновлень безпеки та технічної підтримки.
Provides the means to install, modify, and perform operations on Windows Installer from the command line.
Set the install type for launching an installation package.
msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] <path_to_package>
Parameter | Description |
---|---|
/i | Specifies normal installation. |
/a | Specifies administrative installation. |
/ju | Advertise the product to the current user. |
/jm | Advertise the product to all users. |
/j/g | Specifies the language identifier used by the advertised package. |
/j/t | Applies transform to the advertised package. |
/x | Uninstalls the package. |
<path_to_package> |
Specifies the location and name of the installation package file. |
To install a package named example.msi from the C: drive, using a normal installation process, type:
msiexec.exe /i "C:\example.msi"
You can configure what a user sees during the installation process, based on your target environment. For example, if you're distributing a package to all clients for manual installation, there should be a full UI. However, if you're deploying a package using Group Policy, which requires no user interaction, there should be no UI involved.
msiexec.exe /i <path_to_package> [/quiet][/passive][/q{n|b|r|f}]
Parameter | Description |
---|---|
<path_to_package> |
Specifies the location and name of the installation package file. |
/quiet | Specifies quiet mode, which means there's no user interaction required. |
/passive | Specifies unattended mode, which means the installation only shows a progress bar. |
/qn | Specifies there's no UI during the installation process. |
/qn+ | Specifies there's no UI during the installation process, except for a final dialog box at the end. |
/qb | Specifies there's a basic UI during the installation process. |
/qb+ | Specifies there's a basic UI during the installation process, including a final dialog box at the end. |
/qr | Specifies a reduced UI experience during the installation process. |
/qf | Specifies a full UI experience during the installation process. |
To install package C:\example.msi, using a normal installation process and no UI, type:
msiexec.exe /i "C:\example.msi" /qn
If your installation package overwrites files or attempts to change files that are in use, a reboot might be required before the installation completes.
msiexec.exe /i <path_to_package> [/norestart][/promptrestart][/forcerestart]
Parameter | Description |
---|---|
<path_to_package> |
Specifies the location and name of the installation package file. |
/norestart | Stops the device from restarting after the installation completes. |
/promptrestart | Prompts the user if a reboot is required. |
/forcerestart | Restarts the device after the installation completes. |
To install package C:\example.msi, using a normal installation process with no reboot at the end, type:
msiexec.exe /i "C:\example.msi" /norestart
If you need to debug your installation package, you can set the parameters to create a log file with specific information.
msiexec.exe [/i][/x] <path_to_package> [/L{i|w|e|a|r|u|c|m|o|p|v|x+|!|*}] <path_to_log>
Parameter | Description |
---|---|
/i | Specifies normal installation. |
/x | Uninstalls the package. |
<path_to_package> |
Specifies the location and name of the installation package file. |
/li | Turns on logging and includes status messages in the output log file. |
/lw | Turns on logging and includes non-fatal warnings in the output log file. |
/le | Turns on logging and includes all error messages in the output log file. |
/la | Turns on logging and includes information about when an action started in the output log file. |
/lr | Turns on logging and includes action-specific records in the output log file. |
/lu | Turns on logging and includes user request information in the output log file. |
/lc | Turns on logging and includes the initial UI parameters in the output log file. |
/lm | Turns on logging and includes out-of-memory or fatal exit information in the output log file. |
/lo | Turns on logging and includes out-of-disk-space messages in the output log file. |
/lp | Turns on logging and includes terminal properties in the output log file. |
/lv | Turns on logging and includes verbose output in the output log file. |
/lx | Turns on logging and includes extra debugging information in the output log file. |
/l+ | Turns on logging and appends the information to an existing log file. |
/l! | Turns on logging and flushes each line to the log file. |
/l* | Turns on logging and logs all information, except verbose information (/lv) or extra debugging information (/lx). |
<path_to_logfile> |
Specifies the location and name for the output log file. |
To install package C:\example.msi, using a normal installation process with all logging information provided, including verbose output, and storing the output log file at C:\package.log, type:
msiexec.exe /i "C:\example.msi" /L*V "C:\package.log"
You can apply or remove updates using an installation package.
msiexec.exe [/p][/update][/uninstall[/package<product_code_of_package>]] <path_to_package>
Parameter | Description |
---|---|
/p | Installs a patch. If you're installing silently, you must also set the REINSTALLMODE property to ecmus and REINSTALL to ALL. Otherwise, the patch only updates the MSI cached on the target device. |
/update | Install patches option. If you're applying multiple updates, you must separate them using a semi-colon (;). |
/package | Installs or configures a product. |
msiexec.exe /p "C:\MyPatch.msp"
msiexec.exe /p "C:\MyPatch.msp" /qb REINSTALLMODE="ecmus" REINSTALL="ALL"
msiexec.exe /update "C:\MyPatch.msp"
msiexec.exe /uninstall {1BCBF52C-CD1B-454D-AEF7-852F73967318} /package {AAD3D77A-7476-469F-ADF4-04424124E91D}
Where the first GUID is the patch GUID, and the second one is the MSI product code to which the patch was applied.
You can use this command to repair an installed package.
msiexec.exe [/f{p|o|e|d|c|a|u|m|s|v}] <product_code>
Parameter | Description |
---|---|
/fp | Repairs the package if a file is missing. |
/fo | Repairs the package if a file is missing, or if an older version is installed. |
/fe | Repairs the package if file is missing, or if an equal or older version is installed. |
/fd | Repairs the package if file is missing, or if a different version is installed. |
/fc | Repairs the package if file is missing, or if checksum does not match the calculated value. |
/fa | Forces all files to be reinstalled. |
/fu | Repairs all the required user-specific registry entries. |
/fm | Repairs all the required computer-specific registry entries. |
/fs | Repairs all existing shortcuts. |
/fv | Runs from source and re-caches the local package. |
To force all files to be reinstalled based on the MSI product code to be repaired, {AAD3D77A-7476-469F-ADF4-04424124E91D}, type:
msiexec.exe /fa {AAD3D77A-7476-469F-ADF4-04424124E91D}
You can set public properties through this command. For information about the available properties and how to set them, see Public Properties.
Подія
29 квіт., 14 - 30 квіт., 19
Приєднайтеся до кінцевої віртуальної події Windows Server 29-30 квітня для глибокого занурення технічних сесій і live Q&A з інженерами Microsoft.
Зареєструватися зараз