确定64位与32位WindowsWindows

由网友(哥、人见人碍)分享简介:我想配置Visual Studio 2005的.dll文件是基于操作系统是否是64位或32位的构建过程中进行复制。I'd like to configure visual studio 2005 to copy .dll's based on whether the OS is 64-bit or 32-bit du...

我想配置Visual Studio 2005的.dll文件是基于操作系统是否是64位或32位的构建过程中进行复制。

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

阅读全文

相关推荐

最新文章