How to disable and enable a USB port via command prompt?

4

1

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

open source guy

Posted 2012-11-07T10:01:01.753

Reputation: 151

what do you mean by disable? As in turn it of physically? – Piotr Kula – 2012-11-07T10:04:32.213

no. problematically disable the usb port to prevent unauthorized access data from my pc – open source guy – 2012-11-07T10:08:31.633

Answers

11

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

Posted 2012-11-07T10:01:01.753

Reputation: 3 705