WDK Installation Tips

I was recently loading up a test machine with the various Window Driver Kits (WDKs) so I could test some tools I have been working on. Even for someone who has been developing Windows drivers for a long time, the idiosyncrasies of the various kits and installing them can drive you nuts. To make things worse, I prefer to install the WDK’s in their own tree under a single WDK directory, rather than in the default location Microsoft chooses. I figured people might want a primer.

Notes:
1. While the listed versions are supported as targets, remember that in most cases a driver written for older OS works fine on future systems. The rule is build for the earliest OS you wish to support.
2. The Windows 8 WDK is officially unsupported, but there are a lot of people still using it.Windows 7 WDK
The install is pretty simple:
1. Download the ISO image
2. Burn the ISO to a DVD or mount it with a 3rd party ISO mounting tool
3. Run setup
4. Choose the components (typically build tools and debugger)
5. Specify the directory for the install
If you have already worked with a later WDK but not the older kits, then this kit has a number of surprises. This kit is standalone, you do not need an additional compiler, and if you want to install the Software Development Kit (SDK) you should do it in its own directory. This is the last kit that was not integrated with Visual Studio, instead it uses the BUILD command and SOURCES file to control and build drivers. If you haven’t used BUILD before take a look at my paper on the environment http://www.microsoft.com/whdc/driver/foundation/DrvDev_Intro.mspx
If you want to integrate the WDK with a copy of Visual Studio, take a look at DDKBuild available from http://www.hollistech.com/. DDKBuild allows you to invoke the build process inside the Visual Studio Integrated Development Environment. While there are other tools that integrate BUILD with Visual Studio out there, I prefer this one for the best documentation and since Mark Roddy was the original creator of the tool.Windows 8 WDK
The install is as follows:

1. Install Windows 8 WDK specifying the desired directory
2. Install Visual Studio 2012
3. From the control panel uninstall the WDK
4. Install Windows 8 WDK it will go where the first install put it
5. Install Windows 8 SDK (optional) this will go in the WDK directory
6. Open VS2012 if there is a menu named DRIVER install worked

One other caveat on Windows 8 WDK, if you plan to install the Windows 8.1 WDK on the same system then the Static Driver Verifier will not work in either environment! This is a pain for those of us who have different clients using different environments, and prefer not to use virtual machines.Windows 8.1 WDK
The install is as follows:

1. Install Windows 8.1 WDK specifying the desired directory
2. Install Visual Studio 2013
3. From the control panel repair the WDK
4. Install Windows 8.1 SDK this will go in the WDK directory
5. Open VS2013 if there is a menu named DRIVER install worked

As stated in the Windows 8 WDK, if you have VS2012 installed on the same system then the Static Driver Verifier will not work in either environment.Windows 10 WDK
The Windows 10 WDK is the latest version of the kit. Installation is different than the previous kits:

1. Install Windows SDK for Windows 10 choosing the install directory
2. Install Windows Driver Kit (WDK) 10 goes into the directory for the SDK
3. Start the install of VS2015
3.1. Select Custom install
3.2. Expand Universal Windows app development tools
3.3. Select Tools and Windows SDK 10.0.10069
3.4. Click Next to continue and follow the prompts to complete the installation
4. From the control panel repair the SDK
5. From the control panel repair the WDK

To check if the WDK is correctly installed, try building a sample driver. An error (a common problem is complaining about not finding warning.h) indicates the install was not correct. Note: if you did not perform custom install steps correctly, from the control panel change the VS2015 to reflect the above requirements, and then repair the SDK and WDK.

Windows 10 Enterprise WDK

The Windows 10 WDK is a stripped down version of the kit. This kit has no GUI, you must use MsBuild command line actions to build drivers. Installation is quite different from the previous kits:
1.Open the downloaded ZIP file and extract the contents to the directory where you want the kit.
2.Run LaunchBuildEnv from an Administer CMD Window