jump to navigation

How to debug MDT Litetouch/Driver Problems October 28, 2009

Posted by keithga in MDT 2010, Troubleshooting.
Tags: , ,
1 comment so far

Someone posted a question yesterday about some problems they had getting a driver installed via MDT. In a previous job, I worked in Microsoft Developer Support supporting the Windows Device Driver Kit. I even wrote several driver installation KB articles, and samples for the Windows 2000 & XP DDKs. Most recently, I re-wrote the ZTIDrivers.wsf script for MDT 2010.

Here is a quick overview for adding (non-boot) drivers in Windows. (Please note: Windows XP/2003 Boot drivers use a different process. Drivers like Storage Drivers. )

ZTIDrivers.wsf process

ZTIDrivers.wsf does not actually install a driver for each device during an OS installation. Instead during the pre-installation phase it will:

  • Gather a list of all devices on the machine and their corresponding Plug and Play Device ID (PnPID). 
    A PnPID might look something like: PCI\VEN_8086&DEV_27C9&SUBSYS_01C21028
  • It will then search for any matches in the “Out-of-Box Drivers” folder on your Deployment Share ( in the Out-of-Box Drivers folder, and the control\drivers.xml file).
  • For each driver package found, it will copy the driver locally into the c:\drivers folder.
  • For each folder added into c:\drivers. The folder will be added to the registry:
    HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath
  • When the real OS begins installation, and it finds new devices, it will look in these paths for the drivers.

ZTIDriver.wsf assumptions:

Most of the time, it works just fine, however there are some things are assumed:

  • You must be using a driver that contains at least one PnPID match with the device being installed.
  • Windows will only auto-install drivers that have a valid Driver Signature.
    If one file has been modified, or corrupted, even the *.inf file, the Signature is no longer valid.
  • You might be able to install non-signed drivers depending on the OS, but not for new OS’es like Vista 64-bit.
  • It is possible that there may be other drivers on the local machine that the OS feels are a better match to the driver from the Out-of-Box drivers folder.
  • It is also possible that the device just isn’t working, or the driver just doesn’t work.

I typically only use drivers that are WHQL signed (Disclaimer: I used to work for Microsoft, WHQL), and since Windows Vista, Windows Server 2008, and Windows 7, 64-bit modes will only support signed drivers, it’s usually a good idea to get into the habit of using Signed Drivers only.

Shout out: Michael Niehaus was kind enough to add a check for signed drivers in the MDT 2010 Workbench Driver Import routines. (Thanks Mike!)

To see if your driver is signed, go into the MDT 2010 Workbench, Out-of-Box Drivers, and find your Driver. When found, open the “Properties” page, “Details” tab, and verify the checkbox at the bottom of the screen: “This driver is WHQL signed”.

Debugging Steps:

If you are having troubles with device drivers, it’s typically a good idea to start looking at some basic things:

  • Verify that you have the correct drivers imported into the workbench. Including:
    • Go into the MDT Workbench and find your driver. Verify that the drivers are installed.
    • You should also be able to verify the drivers are present in the Deployment Share.
  • Test the deployment on physical hardware with the actual device installed. It may not be possible to test Video Driver X with Video Card Y, unless they have a subset of matching PnPID’s.
  • Look to see if the Drivers were copied by ZTIDrivers.wsf.
    • You should see ZTIDrivers.wsf identify the PnPID for your device.
    • You should also see ZTIDrivers.wsf xcopy the driver from the Deployment Share locally.
  • If the device and corresponding driver were found by ZTIDrivers.wsf and copied locally. Then Windows should find the device and install. Best place to look for more information is the SetupAPI.log file, used by the PnP Subsystem to log all issues with Device Driver Installation.

More information:

Windows Vista setup log file locations
Troubleshooting Device Installation with the SetupAPI Log File
Windows Setup and Device Installation Logging
Troubleshooting Device and Driver Installations

Keith

Keith Garner is a Deployment Specialist with Xtreme Consulting Group

Platform specific application installs October 28, 2009

Posted by keithga in MDT 2010.
Tags: , ,
add a comment

(New for MDT 2010)

When adding applications in Microsoft Deployment Toolkit it is possible to associate them with a specific OS or platform.

For example, if I wanted to associate an application with “Windows XP – x86 (any service pack version)”, I would select the item in the MDT Management Console, “Properties”, “Details”, “This can run only on the specified client platform:” with the item:

  • All x86 Windows XP

When it comes time to install the application using ZTIApplications.wsf, the script will look up “All x86 Windows XP” in the file ZTISupportedPlatforms.xml and query the local machine using WMI Query Language (WQL):

SELECT * FROM Win32_OperatingSystem
WHERE BuildNumber = '2600' AND OSType=18
SELECT * FROM Win32_Processor
WHERE Architecture=0

In MDT 2008, if we wanted to have an application work on all x86 platforms, and *only* x86, then we would need to select more than one platform.

  • All x86 NT
  • All x86 Windows 2000
  • All x86 Windows XP
  • All x86 Windows Server 2003
  • All x86 Windows Server 2003 R2
  • All x86 Windows Vista
  • All x86 Windows 7 Client
  • All x86 Windows Server 2008
  • All x86 Windows Server 2008 R2

This became a bit of a pain when a new version of windows came along like Windows 7, and I wondered what would happen when Windows 8 came out. Would we need to change our definitions, yet again? The answer was yes.

This was made more complex by the limitations of the WMI provider we use to determine if an OS is x86 or x64, they are different for Windows 5.0 vs Windows 6.0. So there is no way we could create a single entry for “All x86” or “All x64”.

So for Microsoft Deployment Toolkit 2010, we created four new entries that are mostly OS version agnostic.

  • All x86 Pre-Vista
  • All x86 Vista and Newer
  • All x64 Pre-Vista
  • All x64 Vista and Newer

Including “All x86 Pre-Vista” and “All x86 Vista and Newer” in the property page of your Application will ensure that it won’t be installed on a x86 OS.

Keith

Keith Garner is a Deployment Specialist with Xtreme Consulting Group