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




"Junhui Tong" <tongjunhui@xxxxxxxx> wrote in message
news:fm03b6$egj$1@xxxxxxxxxxx
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
change)

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:
http://download.microsoft.com/download/1/1/f/11f7dd10-272d-4cd2-896f-9ce67f3e0240/devcon.exe


.



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. ...
    (microsoft.public.windowsxp.accessibility)
  • 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. ...
    (microsoft.public.windowsxp.hardware)
  • 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. ...
    (microsoft.public.windowsxp.embedded)
  • 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 " ...
    (SuSE)
  • 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. ...
    (microsoft.public.windowsxp.hardware)