简体   繁体   English

在C#Windows应用程序中安装应用程序之前,请检查OS是32位还是64位

[英]Check if OS is 32 bit or 64 bit before application install in C# windows application

I want to validate a 32 bit application install on a 64 bit machine where I need to show some information to the user before installing the application. 我想验证在64位计算机上安装的32位应用程序,在安装该应用程序之前,我需要向用户显示一些信息。 Is this possible? 这可能吗?

I am using the launch condition (Not VersionNT64) for 32 bit and (VersionNT64) for 64 bit but that is not working properly! 我正在使用32位启动条件(不是VersionNT64)和64位启动(VersionNT64),但这不能正常工作!

I'm not quite sure I understand your issue, but if I assume that you have two different installers, one for 32bits and one for 64 bits, you would have to make a small executable that will wrap the two installers and select the correct MSI file. 我不太确定我是否理解您的问题,但是如果我假设您有两个不同的安装程序,一个用于32位,一个用于64位,则必须制作一个小的可执行文件来包装两个安装程序并选择正确的MSI文件。

Environment.Is64BitOperatingSystem

will show you what kind of OS you are currently on. 将显示您当前使用的操作系统。

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

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