6

How to disable and enable USB port via command prompt? Or using a batch script or VBScript? The OS is Windows 7.

Indrek
  • 24,874

1 Answers1

13

Download utility devcon from Microsoft.

Then, use it as follows: List all known USB devices:

devcon find USB*

Disable USB device:

devcon disable "USB\VID_xxxx&PID_yyyy"

Enable USB device:

devcon enable "USB\VID_xxxx&PID_yyyy"
mvp
  • 4,530