Automated MSI installation

前端 未结 3 1018
难免孤独
难免孤独 2020-12-08 11:35

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.

相关标签:
3条回答
  • 2020-12-08 12:17

    Is not released yet but could work for future references.

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

    Auto-deployment with nugget packages.

    0 讨论(0)
  • 2020-12-08 12:21

    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.

    0 讨论(0)
  • 2020-12-08 12:39

    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}
    
    0 讨论(0)
提交回复
热议问题