简体   繁体   English

我想使用wix文件安装基于OS版本的某些文件集和基于另一个OS版本的另一组文件

[英]I want to install certain set of files based on OS version and another set of files based on another OS version using wix file

I need to install one set of files based on OS version and another set if some other OS is there,I have written a condition also but that condition doesn't work properly . 我需要根据操作系统版本安装一套文件,如果有其他操作系统,则需要安装另一套文件。我也写了一个条件,但是该条件无法正常工作。

<Component Id="actionBin_Win7"  Guid="6b73cbe1-4017-48d7-9cdc-784517b2d7a9" DiskId="1">
  <Condition><![CDATA[(VersionNT >= 600)]]></Condition>
  <File Id="file30" Name="AXINTE_2.DLL" LongName="AxInterop.MSTSCLib.dll" src="$(var.agentroot)\bin\AxInterop.MSTSCLib_Win7.dll" />
  <File Id="file31" Name="ZENRDP_2.EXE" LongName="ZENRdpClient.exe" src="$(var.agentroot)\bin\ZENRdpClient_Win7.exe" />
  <File Id="file32" Name="INTERO_2.DLL" LongName="Interop.MSTSCLib.dll" src="$(var.agentroot)\bin\Interop.MSTSCLib_Win7.dll" />
</Component>
<Component Id="actionBin"  Guid="7388F2C9-5CDD-49a8-80F7-7DF5829AE87E" DiskId="1">
  <Condition><![CDATA[(VersionNT < 600)]]></Condition>
  <File Id="file10" Name="AXINTE_1.DLL" LongName="AxInterop.MSTSCLib.dll" src="$(var.agentroot)\bin\AxInterop.MSTSCLib.dll" />
  <File Id="file11" Name="msrdp.ocx" LongName="msrdp.ocx" SelfRegCost="1" src="$(var.agentroot)\bin\msrdp.ocx" />
  <File Id="file12" Name="ZENRDP_1.EXE" LongName="ZENRdpClient.exe" src="$(var.agentroot)\bin\ZENRdpClient.exe" />
  <File Id="file13" Name="INTERO_1.DLL" LongName="Interop.MSTSCLib.dll" src="$(var.agentroot)\bin\Interop.MSTSCLib.dll" />
  <File Id="file14" Name="shortcut.vbs" LongName="shortcut.vbs" src="$(var.agentroot)\bin\shortcut.vbs" />
</Component>

Feature : 特点:

<Feature Id="AllComponents" Title="AllComponents" Level="1">
  <ComponentRef Id="actionBin" />
  <ComponentRef Id="actionBin_Win7" />
</Feature>

Any idea what is going wrong here? 知道这里出了什么问题吗? Even when OS is windows 7, MSI takes files which I intend for WinXP... 即使当操作系统是Windows 7时,MSI也会获取我打算用于WinXP的文件。

Thanks in advance. 提前致谢。

As far as i know about WIX, CDATA is used of ASCII comparison and not for integer comparison. 据我对WIX的了解,CDATA用于ASCII比较,而不用于整数比较。

You can use custom action to compare OS version and then assign true or false value to some session variable and then you can use that session variable in wxs file. 您可以使用自定义操作来比较操作系统版本,然后为某个会话变量分配true或false值,然后可以在wxs文件中使用该会话变量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM