Plug-n-Play command line in Vista

Pain: my [censored] Tablet PC will often (usually!) not recognize my beautiful, wide screen HD LCD panel correctly when I’m working out of the home office. Grrr!! When this happens, the display settings don’t show the wide screen resolutions that will make everything look right. This is really frustrating when I’m time-slicing between the Xbox 360 and the Tablet PC using the KVM… <insert_sound_of_ultimate_suffering />

Original Solution: use Device Mangler to force a rescan of PnP devices. A lot.

Problem: opening Device Mangler (devmgmt.msc) or Computer Mangler (compmgmt.msc) takes too long, especially with both little Tablet hard drives cranking away to get everything else started up after a boot or a wake-up…

Better Solution: since I’m almost always opening an elevated Visual Studio command line anyway, it’s much easier and faster to run devcon rescan and let PnP take it from there. I don’t know if it has to be elevated, but since Device Mangler does, I assume so.

See: The DevCon command-line utility functions as an alternative to Device Manager (Microsoft Support KB)

Caveat: although Vista is not listed in the article as supported, at least the forced rescan feature works; I haven’t used any other features in the tool. Based on the KB article, I’m pretty sure that this no workie with x64. [There’s another good DIY article for forcing a rescan for when I’m motivated enough to compile an x64 version… but my x64 dev box with the older GeForce card doesn’t have this problem.] I’m also pretty sure that it’s an unsupported tool, so be careful!