Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Determine Whether a Computer Has Any USB 2.0 PortsContent of Determine Whether a Computer Has Any USB 2.0 Ports.jsMD5 Hash: FA22DC0F086ECBE5055B8BD266F9D581 |
||
strcomputer = ".";
i = 0; var objwmiservice = GetObject("winmgmts:\\\\" + strcomputer + "\\root\\cimv2"); var colcontrollers = objwmiservice.execquery ("select * from win32_usbcontroller"); var myJS_Enumerator_1 = new Enumerator(colcontrollers); for (;!myJS_Enumerator_1.atEnd();myJS_Enumerator_1.moveNext()) { objcontroller = myJS_Enumerator_1.item(); if (objcontroller.name.indexOf("Enhanced") > -1) { i = i + 1; } } WScript.Echo("no. of usb 2.0 ports: " + i); | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |