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}