Deploying Windows 7 - Part 25: Managing Drivers – Selection Profiles

by [Published on 3 June 2010 / Last Updated on 3 June 2010]

This series of articles on deploying Windows 7 continues by showing how you can manage drivers using selection profiles.

If you would like to read previous articles in this series, please go to:

Tip:
You can find more information about automating LTI deployment in the Windows 7 Resource Kit from Microsoft Press. I am the lead author for this Resource Kit and I also maintain the Unofficial Support Site for the Windows 7 Resource Kit with answers to questions posted by readers, as well as links to the latest resources on Windows 7 deployment, administration and troubleshooting.

In the previous two articles of this series we began discussing how to use MDT 2010 to manage out-of-box drivers needed for Lite Touch deployment. We learned why drivers complicate deployment and examined a simple "let Windows decide" of importing all your out-of-box drivers into the Out-of-Box Drivers folder of your deployment share and letting PnP enumeration on the target computers decide which drivers need to be downloaded from the deployment share and installed. If you are deploying Windows to only a few different makes and models of computers, this simple approach generally works fine. However, if you are deploying Windows to lots of different makes/models of computers, and particularly if you are deploying multiple versions of Windows (e.g. Windows 7 and Windows XP) from the same deployment share, then problems can sometimes occur with this approach because of driver conflicts. For example, you might find that some computers end up installing the wrong drivers, such as a Windows XP Professional driver getting installed on a system you are deploying Windows 7 x86 onto.

The possibility of driver conflicts is one reason why it's important to set up a separate MDT server for your lab environment before you use MDT for deployment on your production network. In particular, your MDT lab environment should include one target computer of each make/model of computer that is present on your production network. That way, you can first try the "let Windows decide" approach to managing drivers in your lab and see if any driver conflicts result. If you don't see any conflicts, you can then use this simple approach for managing drivers for your production deployment. If you do see conflicts however, then your production deployment will need a more controlled approach to managing drivers, which I call the "let me decide" approach. This approach uses two new features introduced in MDT 2010, namely custom folders and selection profiles. We'll learn about these two features as we examine how the "let me decide" approach to managing drivers works.

Using the "Let Me Decide" Approach to Managing Drivers

In this approach to managing drivers for deployment, you exercise control over which drivers are installed for different deployment scenarios. To do this, you begin by creating a hierarchical folder structure within your deployment share to contain the different drivers needed for each scenario. For example, let's say you plan on deploying the following three versions of Windows to different target computers:

  • Windows 7 Enterprise edition x64 architecture for newer systems
  • Windows 7 Enterprise edition x86 architecture for older systems
  • Windows XP Professional (x86) for specific users who still need this OS

To avoid driver conflicts that might be caused by a 32-bit driver being installed on 64-bit hardware or vice versa, or which might be caused by a Windows XP driver being installed on Windows 7 or vice versa, begin by right-clicking on the Out-of-Box Drivers folder in your deployment share and select New Folder from the context menu. This launches the New Folder wizard, in which you type a name for the new folder you are creating (see Figure 1):


Figure 1: Creating a new folder named Windows 7 x64

Finish the wizard to create the subfolder Windows 7 x64 beneath your Out-of-Box Drivers folder (see Figure 2). This subfolder is where you will store any drivers needed for deploying Windows 7 x64 to target computers.


Figure 2
: Custom folder for storing drivers needed for deploying Windows 7 x64

Once you have done the same for the other operating systems you plan to deploy, your folder hierarchy looks like that shown in Figure 3:


Figure 3: Folder hierarchy for deploying drivers to different operating systems

Now you use the Import Driver Wizard described in the previous article of this series to import the necessary drivers for each operating system. The result might look something like Figure 4:


Figure 4: Drivers needed for Windows 7 x64 deployment have been imported

Custom folders are a powerful new feature in MDT 2010 and you can use them to create folder hierarchies for applications, operating systems, drivers, packages and task sequences. The more complex the folder structure you create, the more control you will have over your deployment—that's the plus side of custom folders. But complex folder structures are usually more difficult and time-consuming to manage—that's the minus side. Custom folders can also be moved around by dragging and dropping within your deployment share. Note however that moving a custom folder does not really move any of the underlying files stored in the file system folder where the contents of your deployment share are located. In other words, custom folders are simply a logical way of organizing your applications, operating systems, drivers, packages and task sequences.

Now we need to create our selection profiles. A selection profile simply lets you select one or more folders in your deployment share. Selection profiles are thus used to group items together, and this might be done for various reasons. For example, you can use selection profiles to inject the appropriate set of device drivers and packages into your Windows PE image or into your target computer's operating system. You can also use selection profiles for other purposes such as creating linked deployment shares (new in MDT 2010) or for creating specialized deployment media.

MDT 2010 also includes some default selection profiles that can be used for general purpose deployment scenarios. Figure 5 below shows the default selection profiles—note that selection profiles are stored in the Selection Profiles folder beneath the Advanced Configuration folder in your deployment share.


Figure 5: Default selection profiles included in MDT 2010

The default selection profiles are as follows:

  • All Drivers – This includes all folders beneath the Out-of-Box Drivers folder in your deployment share.
  • All Drivers and Packages – This includes all folders beneath the Applications and Out-of-Box Drivers folder in your deployment share.
  • All Packages – This includes all folders beneath the Packages folder in your deployment share.
  • Everything – This includes all applications, operating systems, device drivers, operating system packages, and task sequences in your deployment share.
  • Nothing – This one doesn't include any folders from your deployment share.
  • Sample – This is a sample selection profile that includes all packages and task sequences in your deployment share.

To create a selection profile that includes only drivers for Windows 7 x64 systems, right-click on the Selection Profiles folder and select New Selection Profile. When the New Selection Profile Wizard begins, type a name for your new selection profile as shown in Figure 6:


Figure 6: Step 1 of creating a selection profile that includes only drivers for Windows 7 x64 systems

Click Next and then select the Windows 7 x64 subfolder beneath the Out-of-Box Drivers folder as shown in Figure 7:


Figure 7: Step 2 of creating a selection profile that includes only drivers for Windows 7 x64 systems

Finish the wizard to create your new selection profile. Once you have repeated the steps above to create additional selection profiles for Windows 7 x86 and Windows XP Professional, your list of available selection profiles should look something like Figure 8:


Figure 8: Three new selection profiles have been created

Now let's make use of our three new selection profiles to control which drivers are deployed with which operating system. To do this, we'll create three new task sequences, one for each of our selection profiles. In other words, one task sequence will be used for deploying Windows 7 x64, one for deployment Windows 7 x86, and one for deploying Windows XP Professional. Figure 9 shows our three task sequences:


Figure 9: Create a new task sequence for each new selection profile

To associate a particular task sequence with a particular selection profile, right-click on the task sequence and select Properties to open its properties page. Then select the Task Sequence tab. Since we want to use selection profiles to control which drivers are injected into our Windows PE boot images and into the operating system being deployed to the target computer, we need to configure the Inject Drivers task within the Preinstall task group in our task sequence. To configure this task, select it on the left and then click the Choose A Selection Profile list control to display the available selection profiles you can choose from (Figure 10):


Figure 10: Choosing a selection profile for the Inject Drivers task within the Preinstall task group of a task sequence

Note:
Task sequences consist of various task groups (e.g. Initialization, Validation, State Capture, etc.) and tasks within these groups (e.g. Gather Local Only, Inject Drivers, Apply Patches, etc.). Task groups can also contain other task groups. You can create new task groups and tasks to customize how your deployments are performed. We will dig deeper into this in a future article of this series.

Because the task sequence whose properties we opened is the one for installing Windows 7 x64, we need to associate the Windows 7 x64 Drivers selection profile with this task sequence as shown in Figure 11:


Figure 11: Associating the Window 7 x64 Drivers selection profile with the Windows 7 x64 Enterprise task sequence

Note in the above screenshot that when you choose a selection profile for injecting drivers, you have two options. The first is to only install matching drivers from the selection profile on the target computer. In other words, PnP enumeration runs on the target computer to determine which drivers contained in the folders indicated by the selection profile, and only those drivers actually needed by the target computer's hardware are installed. This is the default setting and you should usually leave it as is.

The second option is to install all drivers from the selection profile, even if some of those drivers aren't actually needed by the target computer's hardware. You should only use this option if you have drivers that can't be identified properly using PnP enumeration on the target computer. Drivers for the Bluetooth wireless stack sometimes fall within this category, and by selecting the second option you can ensure that the Bluetooth drivers needed by your target computer's hardware get installed. Other examples of hardware/drivers where this option might be needed might be to pre-stage NIC drivers needed for laptop docking stations that are disconnected from their laptops and for printers that will be connected after deployment is finished. Just be careful if you select this option—if you install drivers that aren't needed by the target computer's hardware, some of these unnecessary drivers could conflict with drivers that are needed by the hardware, and this can sometimes cause unpredictable results.

Anyways, now all you need to do is use your Lite Touch Windows PE CD (or your Lite Touch PE .iso with Windows Deployment Services) to boot a particular target computer, step through the Windows Deployment Wizard, select the task sequence for the operating system you need to deploy on that computer, and MDT will ensure that the correct drivers for that operating system are installed on the computer. You can of course automate all this to a certain extent (see the previous articles in this series for more information on how to do this by editing CustomSettings.ini or using the MDT database). Till next time!

If you would like to read previous articles in this series, please go to:

Advertisement

Featured Links