在刻录管理的引导程序中指定 WiX 中软件包的 INSTALLLOCATION [英] Specify the INSTALLLOCATION of packages in WiX inside the Burn managed bootstrapper

查看:17
本文介绍了在刻录管理的引导程序中指定 WiX 中软件包的 INSTALLLOCATION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WiX 3.6 捆绑包(使用 Burn) 和安装多个 MSI 包.一些软件包安装到一个公共位置(C:program filesMyApp).

I have a WiX 3.6 bundle (using Burn) and managed bootstrapper that install several MSI packages. Some of the packages install to a common location (C:program filesMyApp).

我想让用户在托管引导程序应用程序中选择安装位置 (C# WPF,尤其是因为该应用程序很大,安装时需要大约 1 GB).如何为我的包中的每个 MSI 包指定 INSTALLLOCATION?

I want to let the user choose the install location inside the managed bootstrapper application (C# WPF, especially because the application is large to install; about 1 GB). How can I specify the INSTALLLOCATION for each MSI packages inside my bundle?

推荐答案

使用 MsiProperty 为每个 MsiPackage 指定 INSTALLLOCATION=[BurnVariable] 的子项.然后使用 Engine.StringVariables 设置 BurnVariable.

Use an MsiProperty child for each MsiPackage to specify INSTALLLOCATION=[BurnVariable]. Then use Engine.StringVariables to set BurnVariable.

例如,在您的捆绑包中设置:

For example, in your bundle you set:

<Bundle ...>
    <Variable Name='BurnVariable' Value='bar' />
    ...
    <Chain>
        <MsiPackage Source='path	oyour.msi'>
            <MsiProperty Name="INSTALLLOCATION" Value="[BurnVariable]" />
        </MsiPackage>
    </Chain>
</Bundle>    

另请参阅 FireGiant关于这个话题的解释.

See also the FireGiant explanation on this topic.

然后在托管引导程序中,您可以执行类似的操作:

Then in the managed bootstrapper you can do something similar to this:

Engine.StringVariables["BurnVariable"] = "C:program filesMyApp";

这篇关于在刻录管理的引导程序中指定 WiX 中软件包的 INSTALLLOCATION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆