Stage a Driver in Windows 7

Before you start

Objectives: learn how to stage a driver in Windows 7.

Prerequisites: you have to know what are drivers in Windows environment.

Key terms: driver, windows, command, oem, pnputil, inf, install, published, store, case, device, realtek


Example Procedure

In this demonstration we will see how to pre-stage a driver in driver store in Windows 7. For the purpose of this demo we have already downloaded a Realtek AC97 WDM Driver, and put it in theC:\drivers\realtek\Win7. To stage a driver we will use a command line utility called pnputil. We have to open our CMD with administrative privileges. To do that, right-click CMD and then select “Run as administrator”. Let’s see all switches that we can use with pnputil command.

 Command Switches

Command Switches

If we run the “pnputil -e” command, we will see a list of all nonstandard drivers that are built in. These drivers are pre-installed after the installation of Windows 7. Those drivers include drivers for printers, mice, etc.

 pnputil-e

List of OEM Drivers

Notice that the published name for all drivers is OEM and a unique number. We can reference particular driver using that unique published name. Let’s now add a new driver to the driver store. We will use a “pnputil -a” command and give a path to the driver that we want to add. In our case the path is c:\drivers\realtek\win7\alcxau.inf. The pnputil will first process the driver file.

 Adding Driver

Adding Driver

Our driver doesn’t have a valid digital signature that verifies who published it. Because of that we get a Windows security warning. In our case we downloaded this driver from the publisher we trust, so we will go ahead and install this driver anyway.

 Warning

Warning

Our driver was successfully imported. Notice that the published name for our imported driver is oem9.inf in our case. Now that we have added our driver to the driver store, our users will be able to install the corresponding device without the need to download the driver and without the need of entering administrative credentials. So ordinary users will be able to install any device which has a pre-staged driver on our machine.

OEM9.inf

OEM9.inf

For the purpose of this demo, let’s now delete our driver. For that we will use the following command:pnputil -d oem9.inf. The -d switch means that we want to delete it, and oem9.inf is the published name of our driver.

 Driver Deleted

Driver Deleted

Our driver was removed successfully. As we can see, we can take advantage of the PnP utility to pre-stage a driver into our Windows 7 installation. If a standard or nonstandard user tries to install device, they will not be prompted for the actual driver, since Windows will install it automatically from the driver store.