我需要在安装程序后创建一个安装驱动程序的复选框(就像运行程序复选框一样)。另外一个问题是驱动程序依赖于系统平台。我试图这样做:
<CustomAction Id="RunProgram" Directory="INSTALLFOLDER" ExeCommand="[INSTALLFOLDER]Application.exe" Return="asyncNoWait"/>
<CustomAction Id="RunDriver64" Directory="INSTALLFOLDER" ExeCommand="[INSTALLFOLDER]driver/Installer_x64.exe" Return="asyncNoWait"/>
<CustomAction Id="RunDriver32" Directory="INSTALLFOLDER" ExeCommand="[INSTALLFOLDER]driver/Installer_x86.exe" Return="asyncNoWait"/>
<InstallExecuteSequence>
<Custom Action="RunDriver64" After="InstallFinalize">'$(var.Platform)' != 'x64'</Custom>
<Custom Action="RunDriver32" After="InstallFinalize">'$(var.Platform)' == 'x64'</Custom>
</InstallExecuteSequence>
<UI>
<Publish Dialog="ExitDialog" Control="Finish" Order="2" Event="DoAction" Value="RunProgram">
WIXUI_EXITDIALOGOPTIONALCHECKBOX
</Publish>
</UI>`
但它不起作用。错误讯息:
错误1 ICE03:错误的条件字符串;表:InstallExecuteSequence,Column:Condition,Key(s):RunDriver64 F:.. path .. \ Product.wxs 26 1 ..project name ..
此外,我的解决方案并不完美,因为我在那里运行了一个我不想要的行动,但我无法创建空行动。任何建议,我该怎么做?
由于
答案 0 :(得分:1)
您需要将其打包在CDATA
中尝试<![CDATA[NOT(VersionNT64)]]>
和<![CDATA[(VersionNT64)]]>
代替'$(var.Platform)' != 'x64'
和'$(var.Platform)' == 'x64'