确定 64 位与 32 位 Windows [英] Determining 64-bit vs. 32-bit Windows

查看:37
本文介绍了确定 64 位与 32 位 Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 Visual Studio 2005 配置为根据构建过程中操作系统是 64 位还是 32 位来复制 .dll.

I'd like to configure visual studio 2005 to copy .dll's based on whether the OS is 64-bit or 32-bit during a build.

我不想指定平台目标是什么.

I do not want to specify what the platform target is.

我的第一次尝试是使用批处理文件来查找 Windows 版本,但某些 32 位和 64 位版本的 Windows 共享相同的版本号.

My first attempt was to use a batch file to lookup the Windows version, but some 32-bit and 64-bit versions of Windows share the same version number.

有人知道有什么方法可以检查这个吗?

Anyone know of any way to check this?

谢谢!

推荐答案

您应该能够读取环境变量 %PROCESSOR_ARCHITECTURE%.这里有一些关于它的重要信息.

You should be able to read the environment variable %PROCESSOR_ARCHITECTURE%. Here is some great information on it.

http:///blogs.msdn.com/david.wang/archive/2006/03/26/HOWTO-Detect-Process-Bitness.aspx

这篇关于确定 64 位与 32 位 Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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