Link to home
Start Free TrialLog in
Avatar of wonder lust
wonder lust

asked on

Enable/Disable a specific USB port with a batch file or similiar?

As topic says - I'm looking for a way to disable a very specific usb port when I'm running the batch file, or any other method. It just has to be a file that enables / disables the usb port.
Also I'm using win7

thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of Lee Ingalls
Lee Ingalls
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wonder lust
wonder lust

ASKER

Hey, devcon looks good so far, although i have one issue. How do i identify the device i'm trying to enable/disable? aka how do i know which one is which out of all these?
I interpreted your original question as you knew which specific USB port.
Will it be different each time?

You can look at the Registry to see USB usage history
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR
Also i found the device in device manager

edit: it's the same usb port every time i want to shut off - just havnt found it yet
edit2: looked through the registry in the directory u typed but i only found disks and cd drive information?
edit3: found the usb history in "USB" though - still not sure how to identify since most of the information for the usb is the same as the others (drivers, dates etc). Only thing that is different is the location "Location 0 (Port_#0004.Hub_#0001)".
edit9972: Found the location information, although a lot of them has that same location, which one is the right one?
i think i found the id finally, but how do i type it exactly? to test i'm trying this: "devcon.exe find 5&3b0d2cff&0&4" is this correct?
bumpelibump
help plx

i found how to enable/disable devices, also i found the hardware id and everything works except one huge issue, there are several devices with same hardware id.. what do i do?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial