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/