【问题标题】:How to pass msiexec command line options to Wix如何将 msiexec 命令行选项传递给 Wix
【发布时间】:2017-04-06 14:49:40
【问题描述】:

我有一个 Wix 安装程序 Product.msi,它通过自定义操作启动 setup.exe。当我通过命令提示符执行我的安装程序时,例如:
msiexec /i Product.msi /q 或者 msiexec /r Product.msi /q 或者 msiexec /x Product.msi

我想将 /i /r /q /x 选项传递给 setup.exe

是否可以通过 Wix 工具集实现这一点?

【问题讨论】:

    标签: wix windows-installer


    【解决方案1】:

    您提到的所有 MSI 设置属性的标志,然后您可以在自定义操作中引用这些标志,转换为您的 setup.exe 所需的任何格式。

    例如:

    /i 对应于 Installed 的值为 false(如果尚未安装该产品)。

    /r 对应于 WixUIInstallMode 属性上的“修复”值。

    /x 对应于 WixUIInstallMode 属性上的“删除”值。

    /q(及其修饰符,如/qn/qb)对应于UILEVEL 属性,该属性具有从this link 中找到的以下值。

    UILevel:
    
    INSTALLUILEVEL_NONE 2 Completely silent installation.
    INSTALLUILEVEL_BASIC 3 Simple progress and error handling.
    INSTALLUILEVEL_REDUCED 4 Authored UI, wizard dialogs suppressed.
    INSTALLUILEVEL_FULL 5 Authored UI with wizards, progress, errors. 
    

    如果您不熟悉传递值并在自定义操作中引用它们,您可以查看 this answer

    【讨论】:

    • 谢谢@Kurt!无论如何,WixUIInstallMode 属性根本不起作用,如 this post 中所述。还有其他解决方案吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-17
    • 1970-01-01
    • 2016-11-05
    • 2015-10-13
    • 2019-05-17
    相关资源
    最近更新 更多