安装 VC++如果系统是 64 位,则运行时为 64 位

发布于 2024-09-25 01:50:06 字数 225 浏览 1 评论 0原文

我正在创建一个 Visual Studio 2010 安装项目来安装我的应用程序。我的应用程序通过针对不同系统位数提供多个可执行文件来工作,并检测您是在 32 位还是 64 位系统上运行。

如果是 64 位系统,我希望安装程序安装 Visual C++ 2010 x64 运行时。将此设置为先决条件,将禁用 32 位系统上的安装。有什么方法可以将此设置为先决条件,但仅限于 64 位系统,而无需求助于两个不同的安装程序?

I am creating a Visual Studio 2010 Setup project for installing my application. My application works by having multiple executable for different system bitness, and detects if you are running on a 32-bit or 64-bit system.

I'd like to have the Visual C++ 2010 x64 Runtime installed by the installer if it is a 64-bit system. Setting this as a prerequisite, disables installation on 32-bit systems. Is there any way to set this as a prerequisite, but only on 64-bit systems, without resorting to two different installers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

踏雪无痕 2024-10-02 01:50:06

您需要为64位版本和32位版本创建单独的MSI文件以处理WOW64的特殊性。

不可能让一个 MSI 同时安装 64 位和 32 位版本:

不同的包是不同处理器架构所需

因为您将拥有单独的 MSI 文件,所以应该很容易分别将 64 位 VC++ 运行时可再发行组件添加到 64 位 MSI,将 32 位可再发行组件添加到 32 位 MSI。

当然,您可以创建一个引导程序来检查系统架构,然后启动相应的 MSI 文件。我相信 dotNetInstaller 提供了这样一种机制,如 相关问题

You need to create separate MSI files for the 64-bit version and the 32-bit version to deal with the specialities of WOW64.

It is not possible to have one single MSI install both a 64-bit and a 32-bit version:

Different Packages are Required for Different Processor Architectures

Because you will have separate MSI files it should be easy to add the 64-bit VC++ Runtime Redistributables to the 64-bit MSI and the 32-bit ones to the 32-bit MSI respectively.

Of course, you may create a bootstrapper that checks the system architecture and then launches the respective MSI file. I believe dotNetInstaller offers such a mechanism as has been indicated in a related question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文