Automated MSI installation
Asked Answered
A

3

17

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
Alex answered 8/10, 2008 at 4:29 Comment(0)
A
25

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

msiexec.exe /qn /i mypackage.msi

Keep in mind that you need to specify the properties the MSI package expect the user to specify through the UI, and for which it does not have a default value.

You can use the Orca tool to see the list of properties and fiddle around with MSI conditions, etc. And to set values for the properties, you can just specify it in command line; e.g. to set a property ISDEBUG:

msiexec.exe /qn /i mypackage.msi ISDEBUG=1

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 /qn /x {B741B8A3-8DCB-44E0-B06F-2A11F56572DB}
Anyone answered 8/10, 2008 at 5:9 Comment(3)
Good, so how do you "specify certain (non-default) properties the MSI package might expect"?Bergama
Honestly, I don't remember. I haven't touched MSI in about five years.Anyone
To get errorMessages, you should create Installer Log. Silent Command for it: msiexec.exe /qn /i mypackage.msi ISDEBUG=1 /l*vx mypackageInstallerLog.txtCarrolcarroll
B
14

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.

Bizarre answered 8/10, 2008 at 4:37 Comment(0)
S
0

Is not released yet but could work for future references.

http://www.paulstovell.com/octopus/intro

Auto-deployment with nugget packages.

Supervise answered 22/3, 2012 at 19:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.