Advanced Driver Management in Windows 7

Before you start

Objectives: Learn how to use Device Manager, how to edit Group Policy for drivers, and how to add Device Paths using Registry Editor.

Prerequisites: you have to know what are drivers, you have to know what is Group Policy and you have to know what is Registry and Registry Editor.

Key terms: device, driver, install, computer, policy, group, guid, option, windows, manager, audio


Device Manager

To open Device Manager, we cab right-click on Computer, select Manage, and then select Device Manager from the menu on the left.

 Device Manager

Device Manager

Let’s try and update the drivers for the Audio Controller drive on our computer. We will right-click it, and select “Update Driver Software” option.

 Update Driver

Update Driver Software

On the next screen we will select “Browse my computer for driver software”.

 Browse Computer

Browse Computer Option

On the next screen we will select the “Let me pick from a list of device drivers on my computer” option.

 Pick Device

Pick Device Option

By default, the only drivers that will be shown to us are the compatible drivers, but we can force it to show us the incompatible ones as well. We do that by deselecting the “Show compatible hardware” option.

 Compatible Drivers

Compatible Drivers

All Drivers

All Drivers

Just for the sake of this demonstration, we will try to install the “Yamaha USB Audio” driver, which was not in the compatible hardware list.

 YamahaJPG

Yamaha USB Audio

When we click next, we will be warned that this driver might not work with our device. We will click Yes on the warning.

 Warning

Warning

Now, we already know that this driver will not work with our device, because the manufacturer of our Audio device is not Yamaha at all. By doing this we want to show you what happens when we install some driver which is not compatible, or which causes errors with our device. This can happen when we try to install updated drivers for our devices, so we should know how to troubleshoot this kind of problem. When we install a problematic driver, we will see an exclamation mark on that device in the Device Manager.

 Exclamation Mark

Exclamation Mark

There are three ways in which we can troubleshoot this. If the problem with the driver is so serious that it doesn’t even allow us to even boot to regular environment, we can reboot our computer into Safe Mode, then come to Device Manager and then do a Driver Rollback. When we reboot we can also try and go to Last Known Good Configuration instead of Safe Mode. We do that by pressing F8 when we reboot. The Last Known Good Configuration will basically go back to the old version of the driver. Keep in mind that Last Known Good Configuration is overwritten every time we successfully boot to our computer. That means that if we boot to our computer after we install the problematic driver, Last Known Good will be overwritten together with that problematic driver. That’s why it is important to remember when the problem happened and if we have logged in after the problem happened. If we didn’t log in, the Last Known Good Configuration will probably help us to fix the issue.

To rollback the problematic driver we can right-click problematic device, go to its properties, go to the Driver tab, and then click the Roll Back Driver button.

 Driver Tab

Driver Tab

Have in mind that we can only rollback one version of the driver. Windows remembers only the previous driver installed. When we click on the Roll Back Driver button, it will ask us to confirm our intention and give us a little warning.

 Rollback Warning

Rollback Warning

We will click Yes, and when we do that, the old driver will be restored, and our device will be working again.

Group Policy and Driver Installation

There are cases in which we want to allow certain users to install a device without administrative privileges. For example, we can allow our users to install printers, cameras, USB drives, etc. We can do that by putting the driver information into the driver store, but we can also allow them to install the drivers trough Group Policies. In our case we will do that for our audio device. Let’s go to the device properties, and then to the Details tab. Here we will select the “Device class guid” property.

 Device Class GUID

Device Class GUID

The “Device class guid” identifies the drivers actual device. GUID is unique between all the different devices installed on our computer. To get the GUID we have to have that device installed at least once on a computer. There is no way to pull the GUID without installing the device. We will now copy that GUID by right-clicking on it and selecting the Copy option. Now, we will open our local Group Policy editor. To open Group Policy console, we can type “gpedit.msc” in the run menu. In Group Policy Editor we will go to Computer Configuration > Administrative Templates > System > Driver Installation.

 Driver Installation Node

Driver Installation Node

Here we have two settings. One is “Turn off Windows Update device driver search prompt”. If we enable it, this will remove the option that ask us if we want to check the Windows updates whenever our computer does not have a driver. Another setting is the “Allow non-administrators to install drivers for these device setup classes”.  Let’s open that policy and enable it.

 Enabled Policy

Enabled Policy

When we enable it, we can click on the Show button. Using the Show button we can add a GUID to the list of classes which determines the devices which users can install without administrative privileges. We will right-click on the Value field and select the Paste option. This GUID identifies the Audio device on our computer.

 List of Classes

List of Classes

From now on, all users will be able to install drivers for that device. This is great for devices which have to be installed on many computers in our organization. For those devices we can make sure trough local Group Policy or Active Directory environment that users are able to install them.

Searching for Drivers

By default, when we try to install a new device, and we don’t have the proper drivers already installed, and we dont have a driver in the driver store, we will be prompted for the installation media or to check Windows update. In addition to this, we can also specify additional locations where drivers are searched for. To do that we have to go to the Registry Editor. To do that, we will go to the run menu (search box), and enter “regedit”. In Registry Editor we will go to the HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows > CurrentVersion. In the CurrentVersion we will double-click the DevicePath string.

 Device Path

Device Path

By default, Windows only looks in the %SystemRoot%\inf location. We can add additional paths to be searched by separating them by a semicolon. In our example we will also add a network location which contains the drivers. The location is \\w2k8\drivers. The sub-folders in the path will also be searched.

 New Path

New Path

This way we can put all the different drivers for devices in our environment up on the “drivers” share.

Remember

We can use driver policies to identify what devices regular users can install, as well as where the drivers can be read from. We can use the driver rollback feature to try and fix any problems that we have with the device drivers.