質問

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.

役に立ちましたか?

解決

I'm just going to specify the path as %SystemDrive%\Program Files\Microsoft SDKs\Windows\v7.0, but I don't like it!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top