I'm using a tool from the Windows SDK in my Visual Studio project. I need to support both Windows XP (32-bit) and Windows 7 (64-bit) development environments.
The Windows SDK gets installed under Program Files
in both OSes. This is the problem!
I can't figure out what environment variable to use for the path. From a 32-bit process like Visual Studio the environment variables that map to Program Files
are:
- Windows XP (32-bit):
%ProgramFiles%
- Windows 7 (64-bit):
%ProgramW6432%
These are different, so how can I tell Visual Studio what the path is to the Windows SDK?
I'd like to avoid any special configuration, like hardcoding the path or adding more environment variables.