.net - 使用 WIX 通过用户输入设置属性值

标签 .net wix custom-controls wix3.7

MyWixUI_InstallDir.wxs:

我的自定义对话框有:

      <Control Id="DBServer" Type="Text" X="20" Y="60" Width="290" Height="13" 
       NoPrefix="yes" Text="Name of the SQL Server to deploy the DTA script" />
      <Control Id="DBSText" Type="Edit" X="20" Y="72" Width="290" Height="18" 
       Property="DTAServer" />

产品.wxs:

         <util:XmlFile Id="AppConfigSetConnStr" Action="setValue" Permanent="yes" File="[INSTALLLOCATION]TestService.exe.config"            
           ElementPath="/configuration/startup/supportedRuntime[\[]@version='v4.0'[\]]" Name="version"
         Value="----" />

如何将“值”设置为与用户通过 UI 输入的值相同,或者如何访问 Product.wxs 中的属性“DTAServer”。请帮助。

最佳答案

必须声明全局属性(所有字母均为大写) 例如

  <Property Id="ABC"/>

在 Product.wxs 和 MyWixUI_InstallDir.wxs 中使用相同的属性。

关于.net - 使用 WIX 通过用户输入设置属性值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25529527/

相关文章:

windows - 使用 Platform 属性构建 WiX x86/x64

silverlight - 如何在 SL 中使用可移动引线实现语音气泡自定义边框

c# - WPF自定义控件的ToolTip MultiBinding问题

c# - 抛出异常与检查 null,以获取 null 参数

.net - Nhibernate 和 MS Access

c# - 如何使用 DateTime.Today 与 TextBox.Text 的比较验证器?

c# - 根据复选框安装功能

c# - var 不适用于 DataGridViewRow

vb6 - 通过合并模块安装 Tabctl32 时,非管理员用户会触发 MSI self 修复

ios - 自定义 slider 响应缓慢