Tag Archives: Microsoft Deployment Toolkit

Resolution for Unexplained Failure of MDT 2010 Inject Drivers Task

I was recently asked to troubleshoot an issue for our OS build team at work.  They had recently switched from Altiris 6.9 Deployment Server to Microsoft Deployment Toolkit 2010 Update 1 and were having a devil of a time with getting the driver injection to work with Windows 7… even under the simplest of circumstances.  Nothing made sense as to why it wasn’t working.

After going through the entire environment top to bottom, and watching the deployment process over and over again, I finally happened upon the solution.  It turned out to be one of those seemingly insignificant things that caused the whole process to fail.

It turns out the solution was actually quite simple, though difficult to find.  If c:\drivers exists in the captured .wim file (as it did for us, and this is generally a hidden folder so it may not be readily apparent that it is there), the Inject Drivers task during the Preinstall phase of the Task Sequence will not copy any new files to it, so the drivers never get copied.

Instead, it drops them in c:\windows.old\drivers (hidden of course), and doesn’t do anything with them.

Since it’s the windows installation and not the MDT scripts doing that, it’s not a logged action in the deployment logs making it incredibly difficult to troubleshoot.

A couple of other useful tips we discovered along the way.  First, it may be necessary to disable the requirment of signed drivers in Windows 7 to support all drivers you wish to inject.  You can use the local group policy in order to do this, but if you want to integrate it into your build process you can run these two commands:

bcdedit.exe -set loadoptions DDISABLE_INTEGRITY_CHECKS 

bcdedit.exe -set TESTSIGNING ON

Restart your computer for the changes to take effect and you’ve just disabled digital driver signing in Windows 7!

Secondly, your folder names under Out-of-Box-Drivers must exactly match the make & model variables as reported by WMI (which is not always what you would expect/hope it would be).  This handy VBScript can be run on any computer and will display those two pieces of information.  We used it while we running DoubleDriver on our reference machine so that we could gather all of the required information/drivers at once.

Just copy this code into notepad and name it something like DisplayModelInfo.vbs.

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
For Each objItem In colItems
 WScript.Echo "In MDT Variable Make will be: " & objItem.Manufacturer
 WScript.Echo "In MDT Variable Model will be: " & objItem.Model