For each hardware component installed on a
computer, there is an associated device driver. The job of the device
driver is to describe how the operating system uses the hardware
abstraction layer (HAL) to work with a hardware component. The HAL
handles the low-level communications tasks between the operating system
and a hardware component. By installing a hardware component through
the operating system, you are telling the operating system about the
device driver it uses, and from then on, the device driver loads
automatically and runs as part of the operating system.
Device Driver Essentials
Windows Vista includes an extensive library of
device drivers. In the base installation of the operating system, these
drivers are maintained in the file repository of the driver store. Some
service packs you install will also include updates to the driver
store. You can find drivers in the FileRepository folder under %SystemRoot%\System32\DriverStore.
The DriverStore folder also contains subfolders for localized driver
information. You'll find a subfolder for each language component
configured on the system. For example, for localized U.S. English
driver information, you'll find a subfolder called en-US.
Every device driver in the driver store is certified to
be fully compatible with Windows Vista and also digitally signed by
Microsoft to assure the operating system of its authenticity. When you
install a new Plug and Play compatible device, Windows Vista checks the driver store for a compatible device driver. If one is found, the operating system automatically installs the device.
Every device driver has an associated Setup Information
file. This file ends with the .inf extension and is a text file
containing detailed configuration information about the device being
installed. The information file identifies any source files used by the
driver as well. Source files have the .sys extension. Drivers are also
associated with a component manifest (component.man) file. The manifest
file is written in extensible markup language (XML), includes details
on the driver's digital signature, and might also include Plug and Play
information used by the device to automatically configure itself.
Every driver installed on a system has a source (.sys) file in the %SystemRoot%\ System32\Drivers folder. When you install a new device driver, the driver is written to a subfolder of %SystemRoot%\System32\Drivers,
and configuration settings are stored in the registry. The driver's
.inf file is used to control the installation and write the registry
settings. If the driver doesn't already exist in the driver store, it
does not already have an .inf file or other related files on the
system. In this case, the driver's .inf file and other related files
are written to a subfolder of %SystemRoot%\System32\ DriverStore\FileRepository when you install the device.
Using Signed and Unsigned Device Drivers
Every device driver in the driver cache is
digitally signed, which authenticates the driver as having passed
extensive testing by the Windows Hardware Quality Lab. A device driver
with a digital signature from Microsoft should not cause your system to
crash or become unstable. The presence of a digital signature from
Microsoft also ensures that the device driver hasn't been tampered
with. If a device driver doesn't have a digital signature from
Microsoft, it hasn't been approved for use through testing, or its
files might have been modified from the original installation by
another program. This means unsigned drivers are much more likely than
any other program you've installed to cause the operating system to
freeze or the computer to crash.
To prevent problems with unsigned drivers, by default,
Windows Vista warns you when you try to install an unsigned device
driver. Windows can also be configured to eliminate this warning or to
prevent unsigned drivers from being installed altogether. To manage
device driver settings for computers throughout the organization, you
can use Group Policy. When you do this, Group Policy specifies the
least secure setting using one of three configuration settings. These
settings are:
-
Ignore Use this setting to allow users to install any unsigned driver without having to see and respond to a warning prompt.
-
Warn Use this setting to prompt users each time
either to continue with the installation of an unsigned driver or to
stop the installation.
-
Block Use this setting to prevent users from installing unsigned driver software.
| Note |
When Group Policy is set to Ignore or Warn,
unsigned drivers can be installed. When Group Policy is set to Block,
unsigned device drivers can't be installed without first overriding
Group Policy.
|
You can configure device driver–signing settings on a
per user basis using the Code Signing For Device Drivers policy. This
policy is located in User Configuration\Administrative
Templates\System\Driver Installation. When you enable this policy, you
can specify the action to take as Ignore, Warn, or Block. Once enabled,
the system doesn't implement any setting less secure than the
established setting.
| Tip |
If you're trying to install a
device and find that you can't install an unsigned driver, you should
first check the System utility settings for driver signing. If you find
that the settings are set to Block and you can't change the setting,
the Code Signing For Device Drivers policy has been enabled and set to
Block in Group Policy. You must override Group Policy to install the
unsigned device driver.
|
Tracking Driver Information
Each driver being used on a system has a driver
file associated with it. You can view the location of the driver file
and related details by completing the following steps:
-
Start Computer Management. In the Computer Management console, click the plus sign (+) next to the System Tools node.
-
Select Device Manager. You should now see a
complete list of devices installed on the system. By default, this list
is organized by device type.
-
Right-click the device you want to manage and then select Properties. The Properties dialog box for that device opens.
-
In the Driver tab, click Driver Details to display the Driver File Details dialog box. As shown in Figure 1, the following information is displayed:
-
Driver Files Displays the full file path to locations where the driver exists
-
Provider The creator of the driver
-
File Version The version of the file
Figure 1: The Driver File Details dialog box displays information on the driver file locations, the provider, and the file versions.
Installing and Updating Device Drivers
To
keep devices operating smoothly, it's essential that you keep the
device drivers current. You install and update drivers using the Found
New Hardware, Add Hardware, and Update Driver Software Wizards. By
default, these wizards can search for updated device drivers in the
following locations:
In Group Policy, several policies control the search possibilities.
-
Turn Off Access To All Windows Update Features under Computer Configuration\Administrative Templates\System\Internet Communication Management\Internet Communication Settings
If this policy setting is enabled, all Windows Update features are
blocked and not available to users. Users will also be unable to access
the Windows Update Web site.
-
Turn Off Windows Update Device Driver Searching under Computer Configuration\Administrative Templates\System\Internet Communication Management\Internet Communication Settings By default, Windows Update searching is optional when installing a device. If you enable this setting, Windows Update
will not be searched when a new device is installed. If you disable
this setting, Windows Update will always be searched when a new device
is installed, if no local drivers are present.
-
Turn Off Windows Update Device Driver Search Prompt under Computer Configuration\Administrative Templates\System\Driver Installation
If you disable, or do not configure, Turn Off Windows Update Device
Driver Searching, this policy setting affects whether a search prompt
is displayed for Windows Update of device drivers. If this policy
setting is enabled, administrators aren't prompted to search Windows
Update and the search will or will not take place automatically based
on the Turn Off Windows Update Device Driver Searching setting.
Otherwise, administrators will be prompted before Windows Update is
searched.
-
Configure Driver Search Locations under User Configuration\Administrative Templates\System\Driver Installation
If this policy setting is enabled, users can be restricted from
searching floppy disk drives, CD drives, Windows Update, or any
combination of these locations.
You can install and update device drivers by completing the following steps:
-
Start Computer Management. In the Computer Management console, click the plus sign (+) next to the System Tools node.
-
Select Device Manager in the Computer Management
console. You should now see a complete list of devices installed on the
system. By default, this list is organized by device type.
-
Right-click the device you want to manage and then select Update Driver. This starts the Update Driver Software Wizard.
| Best Practices |
Updated drivers can add functionality to a
device, improve performance, and resolve device problems. However, you
should rarely install the latest drivers on a user's computer without
first testing them in a test environment. Test first, then install.
|
-
As shown in Figure 2,
you can specify whether you want to install the drivers automatically
or manually by selecting the driver from a list or specific location.
Figure 2: Choose whether to install automatically or manually.
-
If you elect to install the driver automatically,
Windows Vista looks for a more recent version of the device driver and
installs the driver if found. If a more recent version of the driver is
not found, Windows Vista keeps the current driver. In either case,
click Close to complete the process and then skip the remaining steps.
-
If you chose to install the driver manually, you'll have the opportunity to do one of the following:
-
q Search for the driver
If you want to search for drivers, click Browse to select a search
location. Use the Browse For Folder dialog box to select the start
folder for the search and then click OK. Because all subfolders of the
selected folder are searched automatically, you can select the drive
root path, such as C, to search an entire drive.
-
q Choose the driver to install
If you want to choose the driver to install, click Let Me Pick From A
List Of Device Drives On My Computer. The wizard then shows a list of
compatible hardware. Click the device that matches your hardware. To
view a wider array of choices, clear the Show Compatible Hardware check
box. You'll then see a full list of manufacturers for the type of
device you are working with. As shown in Figure 3,
scroll through the list of manufacturers to find the manufacturer of
the device, and then choose the appropriate device in the right pane.
Figure 3: Select the appropriate device driver for the device you're adding.
| Note |
If
the manufacturer or device you want to use isn't listed, insert your
device driver disk into the floppy drive or CD-ROM drive and then click
the Have Disk button. Follow the prompts. Afterward, select the
appropriate device.
|
-
After selecting a device driver through a search
or a manual selection, continue through the installation process by
clicking Next. Click Close when the driver installation is completed.
If the wizard can't find an appropriate driver, you'll need to obtain
one and then repeat this procedure. Keep in mind that in some cases
you'll need to reboot the system to activate the newly installed or
updated device driver.
Restricting Device Installation Using Group Policy
In addition to code signing and search
restrictions, Group Policy settings can be used to allow or prevent
installation of devices based on device type. The related policy
settings are found under Computer Configuration\Administrative
Templates\ System\Device Installation\Device Installation Restrictions
and include the following settings:
-
Allow Administrators To Override Device Installation Restriction Policies
-
Allow Installation Of Devices That Match Any Of These Device IDs
-
Allow Installation Of Devices Using Drivers That Match These Device Setup Classes
-
Prevent Installation Of Devices Not Described By Other Policy Settings
-
Prevent Installation Of Devices That Match Any Of These Device IDs
-
Prevent Installation Of Removable Devices
You can configure these policies by completing the following steps:
-
Access policy for the appropriate domain, site, or organizational unit (OU).
-
Expand Computer Configuration, Administrative Templates, System, Device Installation, Device Installation Restrictions.
-
Double-click the appropriate policy to view its properties dialog box.
-
Set the state of the policy as Not Configured if
you don't want the policy to be applied, Enabled if you want the policy
to be applied, or Disabled if you want to block the policy from being
used (all as permitted by the Group Policy configuration).
-
If you are enabling the policy and it has a Show
option, click the Show button to use the Show Contents dialog box to
specify which device IDs should be matched to this policy. Click OK.
-
Click OK.
Rolling Back Drivers
Sometimes you'll find that a device driver that
you've installed causes device failure or other critical problems on a
system. Don't worry: You can recover the system to the previously
installed device driver. To do this, follow these steps:
-
If you are having problems starting the system, you will need to boot the system in Safe mode.
-
Start Computer Management. In the Computer Management console, click the plus sign (+) next to the System Tools node.
-
Select Device Manager in the Computer Management
console. You should now see a complete list of devices installed on the
system. By default, this list is organized by device type.
-
Right-click the device you want to manage and then select Properties. This opens the Properties dialog box for the device.
-
Click the Driver tab and then click Roll Back Driver. When prompted to confirm the action, click Yes.
-
Click Close to close the driver's properties dialog box.
| Note |
If
the driver file hasn't been updated, a backup drive file won't be
available. In this case, the Roll Back Driver button will be disabled
and you will not be able to click it.
|
Removing Device Drivers for Removed Devices
Usually when you remove a device from a system,
Windows Vista detects this action and automatically removes the drivers
for that device. However, sometimes when you remove a device, Windows
Vista doesn't detect the change and you must remove the drivers
manually. You can remove device drivers by completing the following
steps:
-
Start Computer Management. In the Computer Management console, click the plus sign (+) next to the System Tools node.
-
Select Device Manager in the Computer Management console.
-
Right-click the device you want to remove and then select Uninstall.
-
When prompted to confirm the action, click OK.
Uninstalling, Reinstalling, and Disabling Device Drivers
Uninstalling a device driver uninstalls the
related device. When a device isn't working properly, sometimes you can
completely uninstall the device, restart the system, and then reinstall
the device driver to restore normal operations. You can uninstall and
then reinstall a device by completing the following steps:
-
Start Computer Management. In the Computer Management console, click the plus sign (+) next to the System Tools node.
-
Select Device Manager in the Computer Management
console. You should now see a complete list of devices installed on the
system. By default, this list is organized by device type.
-
Right-click the device you want to manage and then select Uninstall.
-
When prompted to confirm the action, click OK.
-
Reboot the system. Windows Vista should detect
the presence of the device and automatically reinstall the necessary
device driver.
To prevent a device from being reinstalled
automatically, disable the device instead of uninstalling it. You
disable a device by right-clicking it in Device Manager and then
selecting Disable.
|