WIX(20121106)Property 的 Private or Public

本文介绍了在使用WiX工具集时,属性(Property)的ID设置对于与控件绑定及值回写的影响。特别是指出当ID包含大写字母时,能够实现控件中的值更改后回写到属性中,而含有小写字母的ID则无法实现这一功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Property 的 Id 如果设置为大写后,与控件绑定后,当在控件中改变了值是,值会回写的Property中,如果Id有小写字母 ,则不会回写

 

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>
    <Property Id="PhProductName" Value="PH"/>
    <Property Id="PhManufacturer" Value="PH"/>
    <Property Id="PhSetupRootName" Value="PH"/>
    <Property Id="PhRootName" Value="D:\PHSetup"/>

    <Property Id="PHWEBSITE" Value="ph"/>
    <Property Id="PHWEBSITEPORT" Value="80"/>

    <Property Id="PHSQLSERVERNAME" Value="(local)"/>
    <Property Id="PHSQLUSERNAME" Value="sa"/>
    <Property Id="PHSQLPASSWORD" Value="nimda"/>
    <Property Id="PHSQLDATABASENAME" Value="ph"/>
  </Fragment>
</Wix>

 

转载于:https://www.cnblogs.com/rock_chen/archive/2012/11/06/2756431.html

<?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"> <Package Name="QuickStart Example" Version="0.0.1" Manufacturer="ACME Corp" Compressed="yes" UpgradeCode="1A4D8F2B-3C6E-4A1D-9B5F-7E8C9D0A1B2C"> <MajorUpgrade DowngradeErrorMessage="A newer version is already installed." /> <MediaTemplate EmbedCab="yes" /> <!-- 安装界面配置 --> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" /> <UIRef Id="WixUI_InstallDir" /> <!-- 快捷方式创建属性 --> <Property Id="CREATE_DESKTOP_SHORTCUT" Value="1" /> <!-- 标准目录结构 --> <StandardDirectory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="QuickStart" /> </StandardDirectory> <StandardDirectory Id="ProgramMenuFolder"> <Directory Id="ApplicationProgramsFolder" Name="QuickStart" /> </StandardDirectory> <StandardDirectory Id="DesktopFolder" /> <!-- 安装组件 --> <Feature Id="MainApplication" Title="Main Application" Level="1"> <ComponentRef Id="MainFile" /> <ComponentRef Id="StartMenuShortcut" /> <ComponentRef Id="DesktopShortcut" /> </Feature> </Package> <!-- 主文件组件 --> <Fragment> <ComponentGroup Id="MainFiles" Directory="INSTALLFOLDER"> <Component Id="MainFile"> <File Source="example.txt" /> </Component> </ComponentGroup> </Fragment> <!-- 开始菜单快捷方式 --> <Fragment> <ComponentGroup Id="StartMenuShortcuts" Directory="ApplicationProgramsFolder"> <Component Id="StartMenuShortcut"> <Shortcut Id="StartMenuShortcut" Name="QuickStart Example" Target="[INSTALLFOLDER]example.txt" /> <RemoveFolder Id="RemoveProgramMenuDir" On="uninstall"/> <RegistryValue Root="HKCU" Key="Software\ACME\QuickStart" Name="installed" Type="integer" Value="1" KeyPath="yes"/> </Component> </ComponentGroup> </Fragment> <!-- 桌面快捷方式 --> <Fragment> <ComponentGroup Id="DesktopShortcuts" Directory="DesktopFolder"> <Component Id="DesktopShortcut" Condition="CREATE_DESKTOP_SHORTCUT"> <Shortcut Id="DesktopShortcut" Name="QuickStart Example" Target="[INSTALLFOLDER]example.txt" /> <RegistryValue Root="HKCU" Key="Software\ACME\QuickStart" Name="desktopShortcut" Type="integer" Value="1" KeyPath="yes"/> </Component> </ComponentGroup> </Fragment> </Wix> D:\QuickStart>dotnet build 还原完成(0.5) QuickStart 失败,出现 3 错误 (1.9 秒) D:\QuickStart\Package.wxs(5): error WIX0089: Multiple entry sections '*' and '*' found. Only one entry section may be present in a single target. D:\QuickStart\Package.wxs(5): error WIX0090: Location of entry section related to previous error. D:\QuickStart\Package.wxs(13): error WIX0094: The identifier 'WixUI:WixUI_InstallDir' is inaccessible due to its protection level. 在 2.9 秒内生成 失败,出现 3 错误 这一段报错,请你帮我改一下
07-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值