Uninstall ghost devices or services using the Device Manager

When one remove hardware or a service, then sometimes Windows thinks that the hardware or service still exists and they roam about as ghost devices in the Device Manager. Ghost devices can cause slow boot and other erratic behavior because Windows tries to communicate with a device which isn't there.
Show ghost devices in the Device Manager
  1. Open a command prompt (cmd.exe) with administrator rights
  2. Set the special environment variable with this command:

    SET DEVMGR_SHOW_NONPRESENT_DEVICES=1

  3. Start the Device Manager with this command

    devmgmt.msc

  4. In the Device Manager enable Show Hidden Devices in the View-menu
Now it should show all devices registered in your system, making it possible to remove any ghosts which shouldn't be there. Devices that are greyed out are inactive(not started), if the same device is listed multiple time then consider removing the inactive ones.
Permanently make the Device Manager show non present devices
Instead of having to open a command prompt every time, then one can make the environment variables permanent, so the Device Manager will always show non-present devices when choosing Show Hidden Devices.

Set the environment variables by adding the following STRING values to the registry:

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Control \Session Manager \Environment]
DEVMGR_SHOW_DETAILS = "1"
DEVMGR_SHOW_NONPRESENT_DEVICES = "1"

More Info MS KB241257
More Info MS KB304514
More Info MS KB310126
More Info MS KB315539

Credits regedit.com

Updated: 28 January 2010

Comments:

  1. Billy says:

    "Ghost devices can cause slow boot and other erratic behavior because Windows tries to communicate with a device which isn't there."

    Proof?

  2. DaMisGuy says:

    I would totally agree with “Ghost devices can cause slow boot and other erratic behavior because Windows tries to communicate with a device which isn’t there.”

    I've worked with MS Support on issues for example with Direct Access which were affected by Ghost NICs. Great article SnakeFoot...Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *