Windows

View nonpresent devices in Windows XP's Device Manager

Find out how Windows XP's Device Manager can help you track down nonpresent devices, which may still cause problems even though they're not physically attached to your machine.

When troubleshooting driver problems in Windows XP, one of the first places you may look is Device Manager, which provides detailed information about every piece of installed system hardware. However, with devices such as removable USB drives, you may need information about devices that are not currently connected; Device Manager recognizes these as nonpresent devices. Here's how to get information about those devices:

  1. Go to Start, right-click My Computer, and select Properties.
  2. In the System Properties dialog box, select the Advanced tab and click the Environment Variables button.
  3. In the Environment Variables dialog box, locate the System Variables panel and click New.
  4. In the New System Variable dialog box, type DEVMGR_SHOW_NONPRESENT_DEVICES in the Variable Name text box and type 1 in the Variable Value text box.
  5. Click OK twice.
  6. To view the nonpresent devices, go to Start, right-click My Computer, and select Manage.
  7. Click Device Manager, pull down the View menu, and select Show Hidden Devices.

Note: This tip applies to both Windows XP Home and Windows XP Professional.

Miss a tip?

Check out the Windows XP archive, and catch up on our most recent Windows XP tips.

Stay on top of the latest XP tips and tricks with our free Windows XP newsletter, delivered each Thursday. Automatically sign up today!

About

Greg Shultz is a freelance Technical Writer. Previously, he has worked as Documentation Specialist in the software industry, a Technical Support Specialist in educational industry, and a Technical Journalist in the computer publishing industry.

24 comments
sgreeson
sgreeson

followed this advice carefully twice and it did not work for me.

tntsundancer22
tntsundancer22

Really! It's a simple "click" , just hit "show hidden devices". Very easy, and there are a few. Only way to really delete them in case you are changing or adding new devices,etc. Just a bit long in explanation. Simple.

wjgiambatista
wjgiambatista

Used this item to fix a long-standing problem with my scanner. I had lost connection to it each time I went into hibernation or standby. Found that there was a hidden scanner (so two of the same were defined). When I deleted one of them, the problem went away. THANK YOU!!!!

tomofumi
tomofumi

Some stubborn device driver just can't go away and it keep failed to load properly, in win98 era i can go to safe mode and found out the problem device, so this method is the equivalent in XP/vista...thanks! btw, the quickest method to launch the device manager: press Win+R, type "devmgmt.msc", and press Enter :-)

bigoidy
bigoidy

I assume that I can un-install any grayed out items that show up. Not sure if some are supposed to not be un-installed - particularly in the System area. I would really like to clean up DM as much as possible. Thanks.

bonearzt
bonearzt

When I go to the management console, after going through the above steps, the "show hidden devices" option is not in the view tab. Any thoughts? Never mind, I figured it out.

DimHelmet
DimHelmet

Make sure you type the environment variable name in all caps. Lower case did not work for me!

dougr.adams
dougr.adams

Just want to let everyone know that I just tried it in Vista and it works there too!

ffulton
ffulton

This article has been recycled about 10 times in the last three years

tony
tony

I have tried this and found no difference to the following method. Control Panel / System / Hardware / Device Manager / View. In the View dropdown is..."Show hidden Devices" Maybe I'm missing a point here ? Tony

willrodbard
willrodbard

I do a lot of work with Desktop images, virualisation and VDI, I have found that the following batch file saves me loads of time and I don't have to remember the command all the time: set devmgr_show_nonpresent_devices=1 pause start devmgmt.msc Save the above text in to a notepad file, then remove the .txt file extension and replace with .bat (you may need to go in to your folder view settings to show file extensions for known file types) I have another script that will search for, and automatically remove all those pesky non-present devices for you as well, I will hunt it out and post it shortly.. Will

tntsundancer22
tntsundancer22

Hey, me again.. Always "scan for hardware changes", if it comes up highlighted, it's new, or even "wrong". Just hit properties.It will show you dates, etc. like they all do, and you can then decide to just delete, or re-install or even delete to put in a new device. This part of "system" is very easy and not like your messing with the registry or anything! Hope this was of any help, T.Chapman

hansa
hansa

If an item is removed that requires 3rd party drivers, you will need to reinstall these when this item is attached again. Make sure you have the drivers available before removal.

Photogenic Memory
Photogenic Memory

Be prepared to dump it to a text file. Use the "devcon" command like this: devcon findall * > myhardwareholysheet.txt If you want to see all your belongings on the system; this is the true way to go! Aaaaaaaaaaaaaagh! Have fun little you little GUI monsters, LOL!

herk.papadakis
herk.papadakis

if you have "My Computer" icon on the desktop, right click then select "properties" then "Hardware" tab, then "Device Manager"

dprows
dprows

It appears to me that only doing the "Show hidden Devices" only shows hidden devices that are currently connected. Whereas if you do what was suggested and then do the "Show hidden Devices," devices that are no longer connected to the machine show up. I have not tested this, but this seems to be the difference.

willrodbard
willrodbard

In the last post I forgot to say that the answer is also on Microsoft's Site @: http://support.microsoft.com/kb/241257 Now for the additional script, I would like to thank Simon Price for creating this and saving me loads of time. This will take a little longer to set up but will save you loads fo time in the long run. As before you will need to create a batch file. Copy all ofthe following text in to a bacth file and save it with a name of removehardware.bat somewhere easy like C:\removehardware\ @echo off CLS set _ver=Version 2.0 (May 2008) REM Remove non present hardware in machines REM Called by : Runs Independantly REM Calls : devcon.exe REM by Simon Price REM August, 2007 REM email : abitpricey@gmail.com | sprice@techarchsolutions.com REM Check for updates here: REM REM Updated May 2008 - removed need for lmod - should work on x64 Windows SETLOCAL ENABLEDELAYEDEXPANSION set _base=%~dp0 set _scriptname=%~n0 set path=%_base%_bin;%path% set title=%_scriptname% TITLE %title% %_ver% echo ==================================================== echo =====Removing Non-Present hardware from Machine===== echo ==================================================== echo. echo Version %_ver% echo Written by Simon Price echo Questions / Problems / Suggestions - abitpricey@gmail.com echo or sprice@techarchsolutions.com echo Please Wait set _outfoldroot=%systemdrive%\admin\%_scriptname% if not exist "%_outfoldroot%" md "%_outfoldroot%" set _classsearch=net CDROM DiskDrive display fdc hdc keyboard media monitor scsiadapter scsi unknown floppydisk processor volume MultiFunction mouse battery hidclass system usb SmartCardReader Biometric SBP2 MultiPortSerial DellSerialDevice 61883 set _find=%_outfoldroot%\%computername%_find.txt set _removal=%_outfoldroot%\%computername%_removal.txt set _findall=%_outfoldroot%\%computername%_findall.txt rem remove existing files if exist "%_find%" del /q "%_find%" if exist "%_findall%" del /q "%_findall%" for %%a in (%_classsearch%) do ( rem devcon findall =%%a | sort | lmod /l* /b: [$1] | findstr /iv /c:"matching device" >> "%_findall%" for /f "tokens=1 delims=: " %%b in ('devcon findall ^=%%a ^| findstr /iv /c:"matching device"') do @echo %%b>> "%_findall%" ) ) for %%a in (%_classsearch%) do ( rem devcon find =%%a | sort | lmod /l* /b: [$1] | findstr /iv /c:"matching device" >> "%_find%" for /f "tokens=1 delims=: " %%b in ('devcon find ^=%%a ^| findstr /iv /c:"matching device"') do @echo %%b>> "%_find%" ) @echo. > "%_removal%" set _found=0 for /f "tokens=* delims=" %%a in (%_findall%) do ( set _found=0 for /f "tokens=* delims=:" %%b in ('findstr /L /X /C:"%%a" "%_find%"') do ( set _found=1 ) if /i .!_found!.==.0. ( for /f "tokens=1,2* delims=:" %%c in ('devcon find "@%%a" ^| findstr /iv /c:"matching device"') do ( set _descr=%%d for /f "tokens=1 delims=\" %%A in ("%%c") do set _descr1=%%A ) @echo [!_descr1!],!_descr!,"%%a" >> "%_removal%" @echo removing device : [!_descr1!]!_descr! devcon remove "@%%a" ) ) echo Complete. Output files are located here: @echo [%_outfoldroot%] echo. echo. goto :END :SYNTAX @echo. @echo %message% @echo SYNTAX : %_scriptname% ^ ^ sleep 5 goto :END :END You will now need to find yourself a copy of "devcon" which was listed in one of the earlier posts and save it to the same folder. now open a run command (windows key + R, type cmd + enter) and change to the new folder, type the following: C: Cd C:\removehardware removehardware.bat Once you have done that you should probably go back in to device manager and scan for changes just to make sure notjhing critical was removed cheers Will (And thanks again Simon :-) )

raengler
raengler

After going through the list, I'm finding a TON of stuff that is grayed out. (admission...I plug and unplug lots of stuff...keyboards, mice, joysticks, external drives, etc.). Seems like every time I plug in a USB memory stick for example, it leaves a footprint. 1 - does all this stuff clog up the arteries of my system? 2- Is there a way to quickly identify and get rid of stuff I don't need any more? I'm currently fighting a problem with DVD driver that doesn't recognize a DVD writer...but that's another saga...

shawn
shawn

devcon does not appear to be a command in the DOS cmd.exe window for windows XP?

ffulton
ffulton

"My Computer" -> "Manage" -> "Device Manager"

Willicueva
Willicueva

You are correct, DPROWS. It does indeed show the non presently connected devices which were once installed, like those 2 or three old network cards or USB devices which you have not used in ages. Good to know, as you can then uninstall these so that you can clean your registry.

sonicsteve
sonicsteve

The idea here is to see the devices that device manager is storing but not showing. We all know how to get to device manager but it doesn't by default show the non-present devices.