在 Burn 托管引导程序内指定 WiX 中包的 INSTALLLOCATION [英] Specify the INSTALLLOCATION of packages in WiX inside the Burn managed bootstrapper

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

问题描述

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

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 files\MyApp).

我想让用户选择托管引导程序应用程序内的安装位置(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\to\your.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 files\MyApp";

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

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