How Devices and Driver Packages are Uninstalled
This section provides an overview of what you need to do to uninstall a device and driver package. Perform these actions by running one of the following:
- The Driver Install Frameworks (DIFx) tools.
Note The DIFx tools do not support uninstalling a device, but can be used to uninstall the driver package that was installed on the device.
These actions include the following:
Note These actions do not need to be performed in sequential order.
This uninstall action removes the device node (devnode) that represents the physical instance of the device in the system. Devnodes are removed by using one of the following methods:
Device Manager. For more information, see Using Device Manager.
When a device is uninstalled by using one of these methods, the Plug and Play (PnP) manager removes a subset of the system states that were created during device installation. For example, it removes the association between the driver binary files and the device. This association is used by the Service Control Manager (SCM) to load the appropriate driver for the device.
This uninstall action does not undo all the actions that were performed during the installation process. For example, the driver package and the driver's binary files remain where they were copied to the local hard disk. Some registry keys that were created by a class installer or co-installer (together with some other registry operations) are not changed.
Note After this uninstall action is finished, the devnode for the device no longer exists, however, the driver package is still present in the driver store. If the PnP manager re-enumerates the device (such as when the device is unplugged and then plugged in again), the PnP manager treats it as a new device instance and installs the driver package from the driver store.
This uninstall action deletes the files that are associated with the driver package from the driver store and removes the associated metadata from the PnP manager's internal database. This action also deletes the INF files, which are associated with the driver package, from the system INF directory.
After the driver package has been removed from the driver store, it is no longer available to be installed on a device. The driver package must be restaged and installed to the driver store from the original source, such as optical media, a network share, or Windows Update.
Important You must not manually delete the driver package from the driver store. Doing so can cause an inconsistency between the INF fie, the driver store catalog, and the driver in the driver store. You might also be unable to stage the same driver package to the driver store.
This uninstall action deletes the driver's binary files from the target system directory. This directory is typically %SystemRoot%\System32\Drivers.
Device Manager and the PnP manager do not support this uninstall action. You must complete this action by using the DIFx tools. These tools verify the consistency between the binary file on the target destination and the file in the driver store. These tools do not rely on the file path and file name. Therefore, we strongly recommend that you implement your uninstaller based only on the DIFx tools. These tools are designed to support robust uninstall procedures.
When you uninstall a driver package, the associated driver binaries might still be used by devices or applications. Removing the binaries can lead to system failures. Before you remove any driver binaries, make sure that the binaries are not still being used by any other component on the system and can be safely removed.
Note Starting with Windows 7, the binary files, which were copied to a system when a driver package was installed, can no longer be deleted by using the DIFx tools.
Build date: 5/6/2013