kevinoid / remove-nonpresent-devices

Script to remove non-present devices from a Windows computer system
MIT License
31 stars 10 forks source link

Make script more user-friendly #4

Open lmn1000 opened 12 years ago

lmn1000 commented 12 years ago

I've tried to use script but it just shows me error message Internal Program Error: Device listed in find but not in findall!? This is kind of weird, it does not say anything on source of problem. What causes this error and what can be done to fix it? Nothing in readme either. I think error messages should be more clear.

Tried this script on Windows XP and Windows7 x64 both russian. Also tried it on Windows Server 2003 english and it worked there fine, some locale issues?

kevinoid commented 12 years ago

That message is produced if there is a device which appears in the output from devcon.exe find * which does not appear in the output from devcon.exe findall *. It's just a sanity check and isn't strictly required, so I can remove the check to make the script work on your machine, but before doing that I'd be curious to learn why a device might not appear in "findall". Could you run both commands and see what device is not appearing in the "findall" list?

As for the error message, I'd be happy to make it more clear. Since I don't know what might cause this case, I don't have any good ideas. What would you suggest?

lmn1000 commented 12 years ago

You can get these files at http://i.lmn.name/find.txt and http://i.lmn.name/findall.txt There are quite a number of such devices.

kevinoid commented 12 years ago

Thanks. That's interesting. All of the devices are there, but many have an additional column prepended and some have slight name changes (like "DHCP-" prepended to "ROOT\LEGACY_DMBOOT\0000"). Odd. What version of devcon are you using?

lmn1000 commented 12 years ago

x86 from kb311272

Swiftkill commented 10 years ago

got identical problem on Russian x64 edition of Win7. Using version from WDK Tried remove sanity check, in result no devices was deleted