如何根据目标计算机(32位或64位)有条件地使用WiX安装文件? [英] How do I conditionally install a file with WiX based on the target machine (32bit or 64bit)?

查看:77
本文介绍了如何根据目标计算机(32位或64位)有条件地使用WiX安装文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个32位版本和64位版本的文件。如果我在32位计算机上安装应用程序,则希望安装文件的32位版本。同样,如果安装在64位计算机上运行,​​则应安装64位版本。如何检查要使用WiX运行安装程序的机器类型?



请,没有任何答案。我正在寻找特定的WiX标记以及将其放在我的WiX脚本中的位置。

解决方案

您可以可能使用条件

  VersionNT64 
pre>

 不是VersionNT64 

但是正确的方法是针对32位和64位OS编译单独的安装程序,并且64位组件也应标记为 Win64 = yes )-我不知道是否有可能将Windows Installer软件包标记为同时针对Intel和x64。只有在我使用NSIS完成混合体系结构安装时,我的所有WiX安装程序才会针对每种体系结构安装单独的安装程序。


I have a file that has a 32bit version and a 64bit version. If I install my application on a 32bit machine, I want the 32bit version of the file to be installed. Likewise, the 64bit version should get installed if the installation is run on a 64bit machine. How do I check which type of machine the installer is being run on with WiX?

Please, no one-line answers. I'm looking for specific WiX tags and where to put them in my WiX script.

解决方案

You could probably just do two separate components, using the conditions

 VersionNT64

and

 Not VersionNT64

But the correct way is to compile separate installers for 32 and 64 bit OS's and 64-bit components should also be marked as such (with Win64="yes") - I don't know if it's even possible to mark a Windows Installer package as targeted towards both Intel and x64. Only time I've ever done a mixed architecture installation is with NSIS, all my WiX installers have separate installers for each architecture.

这篇关于如何根据目标计算机(32位或64位)有条件地使用WiX安装文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆