Detecting and upgrading plug-and-play devices and device drivers when you install Windows XP Service Pack 2 (SP2) (887411)



The information in this article applies to:

  • Microsoft Windows XP Professional SP2
  • Microsoft Windows XP Home Edition SP2
  • Microsoft Windows XP Media Center Edition 2005

SUMMARY

This article describes how the Microsoft Windows XP Service Pack 2 (SP2) Setup program determines whether a device driver will be upgraded.

INTRODUCTION

In earlier service packs, the Setup program did not perform any plug-and-play detection of devices and device drivers. In Windows XP SP2, the Setup program detects currently installed device drivers, and the Setup program may upgrade the detected device drivers.

The Setup program also installs new devices. For example, Microsoft Windows XP did not include Bluetooth drivers, but Bluetooth drivers are installed when you install Windows XP SP2. New device setup is simplified because devices that are installed and configured in the same manner are grouped into device installation classes. For example, all cameras can specify that they are members of the Image installation class.

This article discusses how the Windows XP SP2 Setup program determines whether a device driver will be upgraded. It also discusses how to overwrite a third-party driver during the setup of Windows XP SP2 and how to prevent drivers from being overwritten.

MORE INFORMATION

Drivers that are included with an operating system or service pack release are known as inbox drivers. Inbox drivers are drivers that are released with catalog files. Drivers that are trusted by the catalog are known as signed drivers. Drivers that are released without the catalog file are known as unsigned drivers. By default, the Windows XP SP2 Setup program will not upgrade third-party drivers when you install Windows XP SP2.

If you want to upgrade third-party device drivers with driver files that are included with Windows XP SP2, list the devices in the Windows XP SP2 Update.inf file in a format that is similar to the following:
[DeviceClassList]

ClassName = ClassGUID
Note ClassName is the device class name and ClassGUID is the class GUID.
[DevicesToUpgrade]

DeviceHardwareID  =   DeviceINFFileName
Note DeviceHardwareID is the hardware ID of the device and DeviceINFFileName is the name of the .inf file for the device.

Update.exe upgrades the devices that are specified in the [DevicesToUpgrade] sections of the Update.inf file. To do this, the installer must have the following information:
  • The Device ID, also known as the Hardware ID
  • The device .inf file
  • The class GUID of the device
For example, the NVIDIA section in the Windows XP SP2 Update.inf file is similar to the following:
[DevicesToUpgrade]

pci\ven_10de&dev_0100 = nv4_disp.inf
pci\ven_10de&dev_0101 = nv4_disp.inf
pci\ven_10de&dev_0103 = nv4_disp.inf
pci\ven_10de&dev_0110 = nv4_disp.inf
pci\ven_10de&dev_0111 = nv4_disp.inf
pci\ven_10de&dev_0112&subsys_00011179 = nvts.inf
pci\ven_10de&dev_0112&subsys_00021179 = nvts.inf
pci\ven_10de&dev_0112&subsys_001214c0 = nvct.inf

[DeviceClassList]
display={4d36e968-e325-11ce-bfc1-08002be10318}

How to overwrite specific third-party device drivers

To use an Exclusions section to overwrite a driver, include the following sections in the Update.inf file:
[DeviceId.Exclusions]
DeviceHardwareID

[Provider.Exclusions]
DriverProvider

[DevicesToUpgrade]
DeviceHardwareID =  DeviceINFFileName
Note DeviceHardwareID is the hardware ID of the device, DriverProvider is the name of the driver provider, and DeviceINFFileName is the name of the .inf file for the device.

The DeviceId.Exclusions section lets you overwrite the third-party driver for a specific device. The Provider.Exclusions section lets you exclude a driver provider from the third-party check. By default, the driver is not added to the third-party list if Microsoft is the provider in Provider.Exclusions.

The detection and upgrade process

The detection and upgrade process has four distinct phases:
  • Analyze Phase
    Update.exe scans the system, stores the device IDs of devices with third-party drivers, and compiles a list of third-party driver files. Update.exe also uses the [DeviceClassList] section in the Update.inf file to discover the device class GUIDs that should be scanned.
  • Backup Phase
    Update.exe enumerates devices and checks for the hardware IDs in the Update.inf file. For each device that is a member of a device class that is specified in [DeviceClassList], Update.exe verifies that the device driver will be upgraded. If the device driver will be upgraded, the existing device driver is backed up in case Windows XP SP2 is removed from the computer.
  • File Copy Phase
    Device driver and operating system files are copied to the system.
  • Upgrade Phase
    All device classes that are in the [DeviceClassList] section of the Update.inf file are enumerated. Then, the devices that belong to each class are also enumerated. Devices that have third-party drivers are skipped, together with device drivers that were not backed up. If the device has an entry in the [DevicesToUpgrade] section of the Update.inf file and has been backed up, Update.exe upgrades the device driver.
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Modification Type:MajorLast Reviewed:10/26/2004
Keywords:kbsetup kbhowto kbinfo KB887411 kbAudITPRO