关于wix条件消息的有线问题
下面是我的代码关于wix条件消息的有线问题,wix,Wix,下面是我的代码 <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="928a18b3-0f75-4b89-844f-a5699a549011" Name="ExperimentNew" Language="1033" Version="1.0.0.0" Manufacturer="Experimen
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="928a18b3-0f75-4b89-844f-a5699a549011" Name="ExperimentNew" Language="1033" Version="1.0.0.0" Manufacturer="Experiment" UpgradeCode="17929f52-f868-4164-96f6-c47b62781041">
<Package InstallerVersion="200" Compressed="yes" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Property Id="ODPNETINSTALLED" Value="1"></Property>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION" Name="Experiment">
<Component Id ="main_test_file" Guid="{914ED802-82EF-4296-85F2-4095DE0AAC1D}" KeyPath="yes">
<File Id="file1" Source=".\try.bat"></File>
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="Experiment" Level="1">
<ComponentRef Id="main_test_file"/>
<ComponentGroupRef Id="Product.Generated" />
</Feature>
<CustomAction Id ="SetProperty" Property="ODPNETINSTALLED" Value="0"></CustomAction>
<InstallExecuteSequence>
<Custom Action="SetProperty" Before="LaunchConditions" ></Custom>
</InstallExecuteSequence>
<Condition Message="SHOULD NOT APPEAR"><![CDATA[ODPNETINSTALLED="0"]]></Condition>
<UI>
<UIRef Id="WixUI_Minimal" />
</UI>
</Product>
</Wix>
我想更改自定义操作“SetProperty”中“ODPNETINSTALLED”的值
因此,我希望不会弹出条件消息。但每次安装开始时都会显示-为什么会这样
我还做了以下修改:
<Property Id="ODPNETINSTALLED" Value="0"></Property>
<CustomAction Id ="SetProperty" Property="ODPNETINSTALLED" Value="1"></CustomAction>
然后,接受许可协议后会显示条件消息。我不确定我是否完全理解您提到的代码,但我怀疑此特定案例中的问题可能与您希望您的操作运行的顺序有关。您可以在
InstallExecuteSequence
中计划它,但您可能希望它运行得更早LaunchConditions
操作计划用于InstallUISequence
和InstallExecuteSequence
,因此除了在最小UI中,它首先在InstallUISequence中运行。只要你的行为影响了启动条件,我认为你也应该这样做
因此:
- 在CA定义中添加
属性Execute=“firstSequence”
- 将您的操作安排为
和InstallUISequence
InstallExecuteSequence