是否可以使用RegistrySearch
in WiX 捆绑包来隐藏Text
主题?我不知道从哪里开始。在下面的代码中,InstalledDotNet4
变量没有将Text
时间设置为禁用,我找不到禁用Text
(或更改其文本内容)的方法。
捆绑.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="My App" Version="1.0.0.0"
Manufacturer="ACME"
UpgradeCode="d88faa97-2197-4154-9e77-32f9ca773bd4">
<BootstrapperApplicationRef
Id="WixExtendedBootstrapperApplication.HyperlinkLicense">
<Payload SourceFile="Resources/background.png" Id="myLogo" />
</BootstrapperApplicationRef>
<WixVariable Id="WixExtbaLicenseUrl" Value="" />
<WixVariable Id="WixExtbaThemeXml" Value="Resources\MyTheme.xml" />
<WixVariable Id="WixExtbaThemeWxl" Value="Resources\MyTheme.wxl" />
<util:RegistrySearch Root="HKCU"
Key="Software\AnythingToCheck"
Value="Test" Variable="InstalledDotNet4" />
<Chain>
<MsiPackage Id="dotNETv4" DisplayName="My .NET v4 prerequisite"
SourceFile="myApp.msi"
Visible="yes"
InstallCondition="CheckboxDotNetv4" />
</Chain>
</Wix>
我的主题.xml:
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
<!-- Window definition -->
<!-- Font definition -->
<Page Name="Install">
<Checkbox Name="CheckboxDotNet4"
X="205" Y="126"
Width="-100" Height="17"
TabStop="yes" FontId="3"
HideWhenDisabled="yes">.NET Framework 4.0</Checkbox>
<Text Name="InstalledDotNet4"
X="-10" Y="126"
Width="80" Height="17"
TabStop="no" FontId="3"
HideWhenDisabled="yes">(Installed)</Text>
</Page>
<!-- More pages -->
</Theme>
此外,我尝试在 Bundle.wxs 中使用以下代码,但未链接到RegistrySearch
:
<Variable Name="InstalledDotNet4State" Type="string" Value="disable" />