Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Works on Windows 7 X64? #6

Open
clngr opened this issue Jan 5, 2013 · 5 comments
Open

Works on Windows 7 X64? #6

clngr opened this issue Jan 5, 2013 · 5 comments

Comments

@clngr
Copy link

clngr commented Jan 5, 2013

Hello!

I've tried to run the script on a Windows 7 X64 and had no luck, even using the recommended devcon version

The script runs, says that had removed hundreds of devices and when we run it again, all the devices are still there.

Any help would be greatly appreciated :)

@kevinoid
Copy link
Owner

kevinoid commented Jan 5, 2013

First, have you tried running the script in "verbose" mode? If not, run the script with /verbose or --verbose added to the list of command-line arguments and check for any errors in the output.

Otherwise, if you invoke devcon.exe directly, does it work? To test, choose one of the device IDs from the list of removed devices, then run

devcon.exe remove @ID

With ID replaced by the device ID (the @ must precede the device ID in the command). See if it produces any errors. If not, run

devcon.exe findall *

And see if the device ID appears in the output.

@clngr
Copy link
Author

clngr commented Jan 5, 2013

Hello kevin,

The script is running from the following BAT:

@echo off
pushd "%~dp0"

@cscript.exe RemoveDevices.js

popd
exit

I remember that I've tried running it even with SYSTEM credentials. It lists devices being removed, but they remain as nothing happened.

System was unstable, with some hardware issues too. I'll try your tips when possible since I don't have access to the system right now.

Thanks & best regards

@rpavlik
Copy link
Contributor

rpavlik commented Jan 8, 2013

The version of cscript that's being used (32 vs 64 bit) will affect other things, and varies based on the shell that runs your batch file. I don't recall which cmd.exe gets invoked for batch files off the top of my head, but looking into that might help.

@TNT4USMC
Copy link

In order to get the script to run correctly on Windows 7 x64, you have to use a new version of DevCon.exe
copied Devcon.exe Version 6.0.6000.16386 to script folder and it works on Windows 7 x64

@DavidGP
Copy link

DavidGP commented Apr 21, 2016

Works great. I have DevCon.exe version AMD64 v.6.1.7600.16385 in the removedevices.js folder.

I found out that I had to run the utility this way:

Wscript.exe "[path to]\removedevices.js"

(from here: http://superuser.com/questions/488763/how-to-run-js-file-from-a-command-line-on-windows)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants