Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I would like to know how I can display the location of Program Files (x86) in command prompt. I'm using Windows 7 64bit.

I've tried:

echo %programfiles(x86)% and echo %programfiles%,
both of which displays only C:Program Files

When I manually checked the registry,
HKLM/Software/microsoft/windows/currentversion,
the programfilesdir points to C:Program Files and

HKLM/Software/WOW64/Microsoft/winodws/currentversion,
the programfilesdir points to C:Program Files (x86).

But, why am I always being displayed with C:Program Files??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.7k views
Welcome To Ask or Share your Answers For Others

1 Answer

On a 64-bit machine running in 64-bit mode:

  • echo %programfiles% ==> C:Program Files
  • echo %programfiles(x86)% ==> C:Program Files (x86)

On a 64-bit machine running in 32-bit (WOW64) mode:

  • echo %programfiles% ==> C:Program Files (x86)
  • echo %programfiles(x86)% ==> C:Program Files (x86)

On a 32-bit machine running in 32-bit mode:

  • echo %programfiles% ==> C:Program Files
  • echo %programfiles(x86)% ==> %programfiles(x86)%

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...