我的发射条件怎么了?它应该阻止 x86 安装程序在 64 位系统上运行,但它似乎没有效果。
<!-- Launch Condition to check that x64 installer is used on x64 systems -->
<Condition Message="64-bit operating system was detected, please use the 64-bit installer.">
<![CDATA[VersionNT64 AND ($(var.Win64) = "no")]]>
</Condition>
var.Win64
派生自 MSBuild 变量,如下所示:
<!-- Define platform-specific names and locations -->
<?if $(var.Platform) = x64 ?>
<?define ProductName = "$(var.InstallName) (x64)" ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define PlatformCommonFilesFolder = "CommonFiles64Folder" ?>
<?else ?>
<?define ProductName = "$(var.InstallName) (x86)" ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define PlatformCommonFilesFolder = "CommonFilesFolder" ?>
<?endif ?>
我想解决我的问题,但我也有兴趣了解解决此类问题的策略。