How to access the Program Files folder on the CMD command line

  

Generally, the Program Files folder is located on the C drive, which is C:\\Program File. To ensure compatibility, the environment variable %ProgramFiles% is usually used on the command line to indicate the specific path of Program Files.

And in 64-bit Windows, there are two more seemingly similar folders for Program Files and Program Files (x86), as well as the following:
Copy The code
code is as follows: %ProgramFiles%=C:\\Program Files%ProgramFiles(x86)%=C:\\Program Files (x86)%ProgramW6432%=C:\\Program Files These environment variables can be found in the 64-bit command line. Found in the 32-bit command line, the values ​​of these environment variables are slightly different:
Copy code
code is as follows: %ProgramFiles%=C:\\Program Files (x86)%ProgramFiles( X86)%=C:\\Program Files (x86)%ProgramW6432%=C:\\Program Files Obviously, for the 32-bit command line, it doesn't make sense to store the 64-bit files in the Program Files folder, so %ProgramFiles% The value is changed to C:\\Program Files (x86).

There are some similar situations:

64-bit command line:
Copy code
The code is as follows: %CommonProgramFiles%=C:\\Program Files\\Common Files%CommonProgramFiles(x86)%=C:\\Program Files (x86)\\Common Files%CommonProgramW6432%=C:\\Program Files\\Common Files32-bit Command Line:
Copy Code
The code is as follows: % CommonProgramFiles%=C:\\Program Files (x86)\\Common Files%CommonProgramFiles(x86)%=C:\\Program Files (x86)\\Common Files%CommonProgramW6432%=C:\\Program Files\\Common Files

Copyright © Windows knowledge All Rights Reserved