Re: wbscript to disable/enable usb device: "usb root hub"

"Junhui Tong" <tongjunhui@xxxxxxxx> wrote in message
Hi all,
I need to disable and then enable an "usb root hub" frequently. Now I can
successfully do that in device manager. But it's a bit tedious so I tried
to write vbscript to complete the task but made no progress.

Anyone can give me some advise about what OS-interface can help me? (I've
studied the "WMI", it seems only able to query something but cannot

I am not aware of a scripting method that can do this. I'll
probably get another slap on the wrist from mayayana for
posting a command line solution in a scripting group but
since no one else is willing to assist, I'll do it anyway. You
can disable/enable the USB root hub with these commands:

devcon disable USB\ROOT_HUB
devcon enable USB\ROOT_HUB

You can find the spelling of the device name you wish to
manipulate by examining the output from this command:

devcon hwids "*"

You can download devcon.exe from here: