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:


Relevant Pages

  • Re: Network Connections
    ... Also in Device Manager, I was unable to REMOVE USB devices as well of the ... Simple test from Windows Command Prompt will report useful symptoms. ... lights on this NIC, that NIC, and on router all report activity. ... hardware diagnostic provided by your computer manufacturer. ...
  • The dying optical mouse
    ... click properties and click the hardware tab ... Click the Power Mangement tab. ... There may be more than one USB Root Hub to reset. ... click ok and close the device manager. ...
  • Re: embedded turning off hub?
    ... Device Manager if you have it in your image is the same as on XP ... "Standard Enhanched PCI to USB ... OpenHCD PCI to USB Host Controler" ... >> Go to device manager or devcon and check UHCI and EHCI drivers. ...
  • Re: [opensuse] Re: How to change printer name in openSUSE 11.2 YaST?
    ... You can change the name from the command line, ... In my case it was for a network printer: ... cups type: ... "CP1515n configured by hp device manager, via hpijs driver and network " ...
  • Re: USB Ports and DELL
    ... In Device Manager, under the USB Root Hub, and the Power Management tabs, ... > doesn't plug and play USB devices. ...