Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
what do you mean by disable? As in turn it of physically? – ppumkin Nov 7 '12 at 10:04
    
no. problematically disable the usb port to prevent unauthorized access data from my pc – messi fan Nov 7 '12 at 10:08

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"
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .