I ran into this issue working with a hardware manufacturer working on updating their drivers for use on Windows Vista. You may already know that you can uninstall a device directly within the Device Manager. You can simply right click and select uninstall. The drivers are then removed from the system.

This customer obviously wanted to uninstall the driver each time they had a new build to test. However, since it was a USB device, they would uninstall the driver, and then Plug and Play would immediately detect the device again and re-install the driver. If they removed the USB device, the device would disappear from Device Manager, and they could no longer remove it. They were having to to into the registry each time to remove the entry for their device.

You can configure the system to show you devices that you have installed, but that are not currently installed in the system. This would allow you to uninstall that device, which is helpful if you are, say, developing drivers. Or maybe you're just nostalgic and want to see all of the hardware that you have attached to your system.

You can create a new environment variable DEVMGR_SHOW_NONPRESENT_DEVICES and set the value to 1. Then, within Device Manager, you select View -> Show Hidden Devices. Now you can see everything, and you can uninstall something that is no longer there.