In the Window 64bit system, how does one differentiate whether the application is 32bit or 64bit ?, 64bit32bit

Source: Internet
Author: User

In the Window 64bit system, how does one differentiate whether the application is 32bit or 64bit ?, 64bit32bit

To maintain downward compatibility, most 32-bit applications can run on 64-bit Windows operating systems. In most cases, we don't have to worry about it, but sometimes we need to know exactly whether the current application is a 32-bit application or a 64-bit application? Generally, there are three methods:

(1) identify using the Task Manager

For example, open the task manager and select the Processes tab. For a 32-bit program, the Image Name contains the keyword * 32.

For example, the first chrome.exe * 32 indicates that the current version of the chrome browser application is 32-bit.



(2) check whether the path of the executable file in the application contains the (x86) keyword.

If the path of the executable file in the application contains the x86 keyword, generally, this application is a 32-bit application.

When a 32-bit application is installed, the operating system automatically maps the installation directory "c: \ Program Files" to C: \ Program Files (x86 )",

This indicates that the application is a 32-bit application. In addition, note that some windows components are not in the "c: \ Program Files" directory, but in

C: \ Windows \ System32 directory. Do not assume that the DLL library or Window component in this directory is 32-bit,

Actually not. On the contrary, this is the directory of the 64-bit component. The true 32-bit component is placed under the directory C: \ Windows \ SysWow64,

Never be pitted. In fact, Wow64 stands for Window 32 on Windows 64.




(3) If both methods are difficult to use, you can use the code to identify them.

3.1 for Java applications

Properties props = System.getProperties();String bits=String.valueOf(props.get("sun.arch.data.model")); 

Sun. arch. data. model has the return values of 32, 64, or unknown, corresponding to the number of digits of the program respectively.

3.2 for C/C ++ and C # applications, we can use PowerShell scripts.

$width = [System.Runtime.InterOpServices.Marshal]::SizeOf([System.IntPtr])if($width -eq 4){    # 32 bit}else if($width -eq 8){# 64 bit}







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.