views:

1963

answers:

2

What is the best way to automatically install an MSI file or installer .exe? We want to do some automated testing from our build system on the installed copy of the product. Our installer has the usual license acceptance screen, install location, etc.


As FryHard pointed out there are two options in particular that seem handy:

  • "/quiet" - no use interaction
  • "/passive" - process bar only, unattended mode
+3  A: 

If you head over to one of your MSI packages in the command prompt and run a:

Myproduct.MSI /?

A screen will pop up with all the details of command line parameters that you can pass to the MSI. I am sure that in this way you could install your application via a command prompt and in this way automate it.

FryHard
+7  A: 

To automate the insatllation of an MSI package, you can use the /I option, like this:

msiexec.exe /qn /i mypackage.msi

Keep in mind that you also my need to specify certain properties the MSI package might expect the user to specify a value through the UI for and that does not have a default value.

Side note: To automate uninstall, use the /X option with the package or the product code:

msiexec.exe /qn /x mypackage.msi

or this (where you need to change the CLSID with your product code):

msiexec.exe /x {B741B8A3-8DCB-44E0-B06F-2A11F56572DB}
Franci Penov

related questions