The Windows Installer technology uses Msiexec.exe for installing MSI and MSP packages.
This tool gives you full control over the installation process, allowing you to set: install options (install, uninstall, ad inistrative install, advertise a product! display options (full, "asic or no #I during the installation! restart options (if the achine will "e restarted after the installation! logging options update options (apply or re ove updates! repair options (only for an installed package! pu"lic properties which are used "y the installation of the sie$ec co and line is this:
The usual for
msiexec.exe <install_option> <path_to_package> [package_parameters]
Install Options
When launching an installation package, you can set the install type through these options:
msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] <path_to_package>
/i % nor al installation /a % ad inistrative install /j % advertise the product o u % advertise to the current user o m % advertise to all users o /g % the language identifier used "y the advertised package o /t % apply transfor to advertise package /x % uninstall the package and line:
Sa ple co
msiexec.exe /i "C !"xample.msi"
Display Options
The user interface level of the installation can "e configured according to the target environ ent. &or e$a ple, a package distri"uted to clients should have a full #I, while a package deployed through 'roup Policy should have no user interface. Msie$ec.e$e sets the #I level of the installation through these options:
msiexec.exe /i <path_to_package> [/#uiet][/passi$e][/#{n| %|r|&}]
/quiet % (uiet ode (there is no user interaction! /passive % unattended ode (the installation shows only a progress "ar! /q % set the #I level: o n % no #I o b % "asic #I o r % reduced #I o f % full #I and line:
Sa ple co
msiexec.exe /i "C !"xample.msi" /#n
Restart Options
So eti es an installation overwrites files which are in use or needs to re"oot the achine in order to finish it. The re"oot policy used "y the installation can "e set through these options:
msiexec.exe /i <path_to_package> [/norestart] [/promptrestart][/&orcerestart]
/norestart % the achine will not "e restarted after the installation is co plete /promptrestart % the user will "e pro pted if a re"oot is re(uired /forcerestart % the achine will "e restarted after the installation is co plete and line:
Sa ple co
msiexec.exe /i "C !"xample.msi" /norestart
Logging Options
When de"ugging an installation package you can use para eter you use: ultiple logging para eters
in order to create a log. This log will contain different infor ation for each
msiexec.exe [/i][/x] <path_to_package> [/'{i|(|e|a|r|u|c| m|o|p|$|x)|*|+}][/log]
<path_to_log>
/L % ena"le logging o i % include status essages o w % include non%fatal warnings o e % include all error essages o a % ention when an action is started o r % include action%specific records o u % include user re(uests o c % include the initial #I para eters o m % include out%of% e ory or fatal e$it infor ation o o % include out%of%disk%space essages o p % include ter inal properties o v % ver"ose output o x % include e$tra de"ugging infor ation o + % append to an e$isting log file o ! % flush each line to the log o * % log all infor ation, e$cept for v and x options /log % the e(uivalent of /l* and line:
Sa ple co
msiexec.exe /i "C !"xample.msi" /'+, "C !package.log"
Update Options
The Windows Installer co and line can apply or re ove updates (patches for
e$a ple! through these options:
msiexec.exe [/p][/up-ate] [/uninstall[/package<pro-uct_co-e_o&_package>]] <path_to_package>
/p % install a MSP patch. When installing a patch silently, you need to set )*I+ST,--M./* property to 0ec us0 and )*I+ST,-- to 0,--0. .therwise the patch will si ply update the MSI cached on the target achine. /update % apply updates (if there are ultiple updates, you can separate the through the 0;0 character!. /uninstall % re ove an update for a product (if there are ultiple updates, you can separate the through the 0;0 character! o /package % specifies the package for which the update is re oved. and lines:
Sa ple co
msiexec.exe /p "C !./0atch.msp"
msiexec.exe /p "C !./0atch.msp" /#% 1"23456''.78"9"ecmus" 1"23456''9"6''" msiexec.exe /up-ate "C !./0atch.msp" msiexec.exe /uninstall {:;C;<=>C?C8:;?@=@8?6"<A? B=><ACDEAC:B} /package {668C8AA6?A@AE?@ED<?68<@?F@@>@:>@"D:8}
In the a"ove co
and line the first '#I/ is the Patch identifier '#I/ and
the second one is the Product 1ode of the MSI for which the patch was applied.
Repair Options
If you have an installed package, you can use the Windows Installer co line for repairing it: and
msiexec.exe [/&{p|o|e|-|c|a|u|m|s|$}] <pro-uct_co-e>
/f % repair a package o p % repair only if a file is issing o o % repair if a file is issing or an older version is installed o e % repair if file is issing or an e(ual or older version is installed o d % repair if a file is issing or a different version is installed o c % repair if a file is issing or the checksu does not atch the calculated value o a % forces all files to "e reinstalled o u % repair all the re(uired user%specific registry entries o m % repair all the re(uired co puter%specific registry entries o s % repair all e$isting shortcuts o v % run fro source and recache the local package and line:
Sa ple co
msiexec.exe /&a {668C8AA6?A@AE?@ED<?68<@?F@@>@:>@"D:8}