Anyone know the command to force "scan for hardware changes" in Windows XP?

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
I know how to do it through Device Manager, but I need to be able issue that command through a command prompt. Anyone have any ideas?
 

Smilin

Diamond Member
Mar 4, 2002
7,357
0
0
Other than devcon the only way I know is to right click on your computer in device manager and 'scan for hardware changes'.

You could perhaps programatically trigger this using the same APIs that devcon taps. I'm not familiar with setupapi so I wouldn't know where to begin :(

 

Lord Evermore

Diamond Member
Oct 10, 1999
9,558
0
76
Doing a search, someone on another forum pointed out that you could open the Add Hardware Wizard by making a shortcut to hdwwiz.cpl. It's still the wizard though, would that work for you? Their final solution was still devcon.
 

JackBurton

Lifer
Jul 18, 2000
15,993
14
81
Thanks alot guys! I think I might just write a script to install devcon and then just execute the rescan command afterwards.