如何将默认的“安装位置"传递给 RtfLicense 引导程序? [英] How do I pass a default 'install location' to the RtfLicense bootstrapper?

查看:21
本文介绍了如何将默认的“安装位置"传递给 RtfLicense 引导程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 rtflicence 标准引导程序在链中的 poject msi 之前安装 dotnet.

I'm using an rtflicence standard bootstrapper to install dotnet before my poject msi in a chain.

我注意到有一个选项"按钮,它显示安装位置对话框并允许用户更改默认安装目录.

I noticed that there's an 'options' button which displays an install location dialog and allows the user to change the default installation directory.

我需要:

  1. 阻止显示此选项按钮,或
  2. 使用默认路径填充安装位置,并在用户更改时将其传递回安装程序.

我读到可以从引导程序将 Burn 变量传递给 msipackages,但我没有找到任何进一步的细节,希望能指出正确的方向.

I read that it's possible to pass Burn variables to msipackages from bootstrapper but I haven't found any further details and would appreciate being pointed in the right direction.

谢谢

推荐答案

要使用选项 1,您必须推出自己的 BootstrapperApplication 并从菜单中删除选项按钮.

To go with option 1, you'd have to roll your own BootstrapperApplication and remove the options button from the menu.

选项二更容易实施.引导程序使用名为 InstallFolder 的特殊 Burn 变量来获取和设置该视图的文本块中的内容,您可以在 Bundle 元素内分配该内容.

Option two is significantly easier to implement. The bootstrapper uses a special Burn variable called InstallFolder to get and set what is in the text block on that view, which you can assign inside the Bundle element.

<Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]"/>

常量 ProgramFilesFolder 将在程序启动时设置该文本块的值,如果用户浏览到不同的目录,它将存储在同一变量中.要将其传递给 MSI,在您的链中,您使用 MsiProperty 标记传递 InstallFolder(INSTALLLOCATION 是您的链中的属性名称).WiX 项目).

The constant ProgramFilesFolder will set the value of that text block when the program starts, and if the user browses to a different directory, it will be stored in that same variable. To pass it to the MSI, in your chain, you pass the InstallFolder using the MsiProperty tag (INSTALLLOCATION is the name of the property in your WiX project).

<MsiPackage Vital="yes" DisplayName="Your Name" Id="MsiId" SourceFile="path/to/file.msi">
    <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
</MsiPackage>

这篇关于如何将默认的“安装位置"传递给 RtfLicense 引导程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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