Remove Unused Drivers and Devices

by Tony Bradley [Published on 16 Sept. 2005 / Last Updated on 16 Sept. 2005]

If you remove a piece of hardware, particularly USB devices that may be frequently swapped out, without first Uninstalling it in Device Manager, the drivers remain behind, but the device no longer shows up in Device Manager by default.

Plug and Play, when it works, makes life simpler by automatically detecting and configuring new hardware as it is attached to the computer. With today's USB, smartcard and other removable media, it makes life much more efficient. But, while Windows is fairly good at detecting the hardware and installing the appropriate drivers, it is not so good at realizing that the device is gone and purging the drivers from the system.

If you actually right-click the device in Device Manager and select Uninstall, the device and its associated drivers will be removed. But, if you just remove the device, it will disappear from the Device Manager, but may leave the drivers behind. Those drivers, aside from taking up space, could later be found to contain vulnerabilities and expose your system to compromise even though you aren't aware the drivers exist.

With the device physically removed from the computer, the only way to view, and thereby have access to uninstalling, the drivers is to alter Device Manager to Show hidden devices. Follow the steps below to display the hidden device information:

  1. Right-click My Computer and select Properties
  2. Click on the Advanced tab
  3. Click on Environment Variables
  4. Below the bottom Environment Variables window pane (System Variables), click on New
  5. For Variable Name, enter devmgr_show_nonpresent_devices
  6. For Variable Value, enter 1
  7. Click OK to close Environment Variables and OK again to close System Properties

Now that you have created this entry, when you open Device Manager, you can click on View and then select Show hidden devices from the menu. You can identify the hidden devices by their grayed-out icons.

Tony Bradley is a consultant and writer with a focus on network security, antivirus and incident response. He is the About.com Guide for Internet / Network Security (http://netsecurity.about.com), providing a broad range of information security tips, advice, reviews and information. Tony also contributes frequently to other industry publications. For a complete list of his freelance contributions you can visit Essential Computer Security (http://www.tonybradley.com).

See Also

Featured Links