Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 7 64-bit programfiles environment variable

Does anyone know if windows 7 will somehow defer back to the "ProgramFiles(X86)" environmental variable when the "ProgramFiles" variable is used?

We have a situation where a developer is using visual studio and the proj file references assemblies using "$(ProgramFiles)". The machine is 64-bit and the "ProgramFiles" variable points to "C:\Program Files", however the assemblies are in "C:\Program Files (X86)" yet the project builds. It does not build if the literal "C:\Program Files" path is used. The compiler says it cannot find the assemblies

like image 874
PhilBrown Avatar asked Dec 08 '10 20:12

PhilBrown


People also ask

What is Programfiles variable?

The PROGRAMFILES system variable contains the fully qualified name of the folder defined by Windows to store applications. In English Windows, that folder is named Program Files, and it is located off the root of the drive on which Windows is installed.

What is the default environment variable path for Windows 7?

The default directory path for most versions of Windows is c:\Windows (for Windows NT 4 and 2000, it is c:\WinNT).

How do I get a list of Environment Variables?

You can open a Command Prompt, type set , and press Enter to display all current environment variables on your PC. You can open PowerShell, type Get-ChildItem Env: , and press Enter to display all current environment variables on your PC.


1 Answers

Yes, Windows automatically maps folder and file access to c:\program files for 32-bit programs to c:\program files (x86). Visual Studio as well as MSBuild are 32-bit programs. Same is true for c:\windows\system32 vs c:\windows\syswow64.

like image 166
Hans Passant Avatar answered Sep 19 '22 12:09

Hans Passant