Hack116.Uncover Hidden Hardware with the Device Manager


Hack 116. Uncover Hidden Hardware with the Device Manager

Hardware ghosts and other hidden devices can cause system conflicts, and the Device Manager won't report on them. This hack forces the Device Manager to uncover all your hidden hardware so that you can resolve any conflicts.

One of the strangest hardware problems you'll encounter in XP are hidden and ghosted hardware devices that are invisible to you but that can cause system conflicts. You won't be able to see them in the Device Manager [Hack #115] When you use that troubleshooting tool, you won't be able to uncover any problems they might be causing.

The Device Manager hides several types of these devices. Non-Plug and Play printers, drivers, and similar devices don't show up. Most newer devices are Plug and Play, so you'll most likely encounter this problem only if you have old hardware attached to your PC. (Plug and Play devices are automatically recognized and installed in XP.) In this instance, the device is physically present on your PC, but the Device Manager doesn't show you it's there.

Then there are the so-called nonpresent or ghosted devicesdevices you've removed from your system without doing an uninstall, or whose uninstallation did not work properly. These devices aren't physically present in your system, but XP treats them as if they were and devotes system resources to them. For example, if you physically remove an old network card without doing an uninstall, it might cause IP and other kinds of conflicts because XP treats it as if it were still in your system.

The Device Manager also might not give you details about USB devices that you use only temporarily and that you frequently attach and removefor example, MP3 players that you attach to your PC only when you want to add or delete MP3 files from them. Even when these devices aren't present in your system, XP devotes resources to them. If you replace one USB device with another of the same model, it's best to go through the uninstall process rather than just swap them.

And then there are devices you might have moved from one slot to another. XP might believe they are actually present in two slots, so it devotes resources for both slots to them.

Displaying these hidden devices can help with troubleshooting. For example, a hidden device could possibly conflict with a nonhidden device. And sometimes you might want to uninstall hidden devicesfor example, when you've moved a non-Plug and Play network card from one slot to another and want to uninstall it from one slot.

But to do this kind of troubleshooting you'll need to force the Device Manager to display information about the devices; otherwise, you won't know how to solve the problem.

Forcing the Device Manager to display non-Plug and Play printers, drivers, and similar devices is a simple matter. Run the Device Manager by typing devmgmt.msc at a command prompt and pressing Enter, and then choosing View Display Hidden Devices.

Displaying ghosted or nonpresent devices takes a little more work. You'll set a systemwide environment variable that forces the Device Manager to display them. First, right-click My Computer and choose Properties Advanced Environment Variables. The Environment Variable dialog box opens. This dialog box lets you set system variables for the entire system or for individual users. Environment variables control a variety of XP features, such as the location of your Windows directory and TEMP directories and the filename and location of the command processor that will launch when you run the command prompt.

The Environment Variables dialog box contains two sections: "User variables" and "System variables." To apply the variable to a single user, use the "User variables" dialog box; to apply the variable to all users, use the "System variables" dialog box. In this case, you'll want to create the variable systemwide, so click New in the "System variables" section. The New System Variable dialog box appears. For "Variable name," type devmgr_show_nonpresent_devices. Once you've created the name, you need to give it a value. To turn the setting on, type 1 in the "Variable value" box. You can see the box filled out properly in Figure 13-3. Click OK and then OK again.

Figure 13-3. Setting the Device Manager to always show ghosted devices


So, now you've set the system variable properly, but the Device Manager won't display ghosted devices yet. First you have to tell it to display them. Run the Device Manager by typing devmgmt.msc at a command prompt or in the Run box and pressing Enter. Then, choose View Display Hidden Devices and the ghosted devices will appear, as shown in Figure 13-4. You should see quite a few devices now, including a lengthy list of non-Plug and Play drivers. Typically, devices that are not currently present on your PC will be shown as gray, rather than the black that connotes present devices. You might also see some devices listed more than once, as shown in Figure 13-4.

Figure 13-4. Displaying ghosted devices in the Device Manager


Now, use the Device Manager to troubleshoot any of those ghosted devices, as detailed in [Hack #115] . If you find any ghosted devices that you will no longer use on your PC, uninstall them from the Device Manager by right-clicking the device and choosing Uninstall.

13.3.1. Hacking the Hack

If you want to use the Device Manger only on occasion to show ghosted devices and you don't want to add another environment variable to your system, you can add the variable on an instance-by-instance basisfor example, for a single time that you run the Device Manager. At the command prompt, type set devmgr_show_nonpresent_devices=1 and press Enter. You won't get a prompt in response; the command prompt will stay blank. At the same instance of the command prompt, type start devmgmt.msc and press Enter. The Device Manager will launch in a separate window. Now, enable the Device Manager to show ghosted devices in the same way you did previously in this hack.

Keep in mind that you have to run the Device Manager from the same instance of the command prompt in which you typed devmgr_show_nonpresent_devices=1. If you run the Device Manager outside the command prompt, it won't display ghosted devices.



    Windows XP Hacks
    Windows XP Hacks, Second Edition
    ISBN: 0596009186
    EAN: 2147483647
    Year: 2003
    Pages: 191

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net