No announcement yet.

GhostBusters: Removing Traces of Hardware that is no longer installed.

  • Filter
  • Time
  • Show
Clear All
new posts

    GhostBusters: Removing Traces of Hardware that is no longer installed.

    This Guide assumes the reader has knowledge of how to get to certain dialogues and control panels and a common sense approach to this type of troubleshooting and system maintenance. If you are unsure of what to do, DON'T DO IT! ASK FOR HELP FIRST!!!!

    So, based on a request in this thread, I'm writing this guide concerning removing "Ghosts of Drivers Past."

    When you remove or update hardware, traces of old drivers almost always remain in the Registry in Windows. Also, when you attach/detach USB Devices, they leave behind these same traces. This applies to every version of Windows that contains a Registry. Since Windows 2000, there is an Environment Variable that allows you to display these "Ghosts" in Device Manager. This guide is only going to focus on Windows 2000-7. If anyone is still using Windows 9x; OMG, you have bigger problems.

    In Device Manager, on the View menu, there is an item labeled "Show hidden devices"; it is not checked by Default and it only applies to the current session you have DM open. Once you close and re-open DM, you have to re-enable the SHD switch. However, this switch does not reveal as much hidden hardware as it's name implies. You have to add this Environment Variable, "DEVMGR_SHOW_NONPRESENT_DEVICES=1" to make full use of the "Show hidden devices" switch.

    To add the string, you can do it one of 2 ways. (Some of the following text is taken from MSKB Article #241257. It applies to every version of Windows 2000-7, even though the article only mentions 2000.)

    1. Click Start, point to Programs, point to Accessories, and then click Command Prompt.

    2. At the command prompt, type the following lines, pressing ENTER after each line

    set devmgr_show_nonpresent_devices=1
    start devmgmt.msc
    where %SystemRoot% is the folder in which Windows 2000 is installed.

    NOTE: When you quit Device Manager and close the Command Prompt window, the set devmgr_show_nonpresent_devices=1 variable is turned off so you cannot see the phantom devices.

    An alternative approach, for developers or power users who need this feature enabled constantly, is to set this environment variable globally. (This is the way I do it.) To do so, perform the following steps:

    1. Right-click My Computer.
    2. Click Properties.
    3. Click the Advanced tab, or the Advanced System Properties link.
    4. Click the Environment Variables button.
    5. Click any Variable in the System Variables box to select it.
    6. Click the "New" button.
    7. Type "devmgr_show_nonpresent_devices" (No quotes) in the Variable Name box.
    8. Type "1" (No Quotes) in the Variable Value box.
    9. Click Ok all the way out.

    Open Device Manager, then click the View menu and click "Show hidden devices". You will now be able to commence with the Ghost Hunting. Here is a screen shot of what it will look like when you have that set up and there are Ghosts in the Machine:

    See the light-colored "greyed out" items "Portable Devices" category? They are tied to "SanDisk U3 Cruzer Micro USB Device" in the Disk Drives Category. That device is not currently attached to the System, but it was at one point and a Driver was installed for it. The next time it gets attached and if it is attached to the SAME USB PORT as it was originally, no additional drivers or pointers to it will be installed. Change USB ports and more Drivers and Pointers get installed. Over time, if there are enough USB Devices attached/detached/reattached to the machine, they can stop being detected as the Plug and Play functionality gets kinda gummed up. So, we can surmise that Stick_2 was plugged into 3 different USB Ports on this machine.

    Windows 2000, XP and Vista deal with USB devices in a more clumsy fashion than Windows 7, by the way. If you've ever had difficulties with Windows detecting and enabling USB Thumb drives, this guide will help.

    Not all Ghosts are problems nor do they need to be removed. Certain items in the "Sound Video and Game Controllers" are not true Ghosts. All the Microsoft items are legit and can be left alone. The High Definition Audio Device can be removed since I know for a fact in this case that it is the Onboard Audio and it is disabled in the BIOS and is not needed. The Ghosts that are present on a system will have to be dealt with on a case-by-case basis and most of the time will require prior knowledge or use of the system in question.

    So, now that you can see the Ghosts, what do you do with 'em? You can Right-Click on them and choose "Uninstall". This removes them from the Registry and deletes the pointers to the old hardware. You need to remove all traces of the device in all the categories it belongs to for full removal. I can't explain how many categories a particular device will belong to, you'll have to figure that stuff out as you go. After a while of looking at this stuff, it will have a logic that will make sense. Experience definitely helps.

    I hope you find this Guide useful. Please ask questions if you don't understand something.


    PS: OS Useful Info Sticky Caveboy?

    PSS: That was fast.
    Last edited by Dr. Zhivago; Sep 28, 2010, 04:45 PM.

    Nice trick, thanks for this.


      You're welcome.


        Dr. Z, little help here please!

        So I was working through device manager, apparently removing stuff a bit too randomly. Going into the HID listing, I removed a bunch of "ghosts".

        The issue is that my mouse (Logitech MX Revolution) now sucks. Badly. Clicks regularly become double clicks. Trying to select a range of text is an exercise in frustration as the click/double click issue overrides intent. Swapping the mouse out, moving the mouse to a different USB port, detecting hardware changes, reinstalling the driver ... nothing seems to unbork my now very frustrating to use PC.

        I'm sure I've missed some good troubleshooting steps, and am running out of ideas that don't include an OS reinstall or similarly drastic steps. Thoughts?


          So, can you go to Programs and Features or Add/Remove Programs and uninstall the Logitech Drivers, reboot and reinstall? You can navigate with a keyboard yes?


            Originally posted by Dr. Zhivago View Post
            So, can you go to Programs and Features or Add/Remove Programs and uninstall the Logitech Drivers, reboot and reinstall? You can navigate with a keyboard yes?
            Yes, I can do that. When this fun began, I was using the Windows 7 drivers (Logitech drivers not installed). I'll uninstall / reinstall for giggles though.


              Is the Human Interface Device Access Service running?


                Yes. Startup type is manual, status started.


                  At this point, try a System Restore to before you had the problem.