Freigeben über


How Visual Studio reads Windows SDK Registry Keys

The Windows SDKs write registry keys that are used by Visual Studio to determine which set of SDK headers, libraries and tools to use when building unmanaged applications.  This article applies to the following SDKs:

  • Windows SDK for Windows Vista v6.0
  • Windows SDK for Windows Vista Update v6.0
  • Windows SDK Components in Visual Studio 2008 v6.0a
  • Windows SDK for Windows Server 2008 v6.1

These top-level keys are written:

On all platform architectures: 

  • HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows
  • HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows

Plus an additional key when the SDK is installed an X64 or IA64 computer:

  • HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows

Visual Studio 2008 (retail and Express SKUs) look at the CurrentInstallFolder value to determine which is the latest SDK.  Whichever SDK is installed last  (including the SDK components in Visual Studio) writes a version value to CurrentInstallFolder.  Visual Studio looks first for HKCU node:

  • HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows@CurrentInstallFolder

If this key exists, Visual Studio uses the value in CurrentInstallFolder as the "current" SDK.  If, by some chance this key does not exist, Visual Studio looks for HKLM node:

  • HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows@CurrentInstallFolder

Comments