How to reset USB ports with a batch file

Written by cameron easey
  • Share
  • Tweet
  • Share
  • Email

Resetting a USB port on your computer is can be done by turning off and then turning back a USB port using a batch file. To do this you need to set ACL permissions in the Windows registry. This requires a utility available from Microsoft called SubInACL. Once this file has been installed on your system, you can create the batch files needed to reset a USB port on your computer.

Skill level:
Moderately Easy

Other People Are Reading

Instructions

  1. 1

    Go to the Microsoft Download Center web page for "SubInACL." Click the "Download" button to save the file to your desktop. Double-click the "subinacl.msi" file to install SubInACL on your system

  2. 2

    Click the "Start" button and type "Notepad" into the search box. Press "Enter" to open the program.

  3. 3

    Highlight "Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR]

    "Start"=dword:00000004" and right-click to display the context menu. Select the option for "Copy". Click the "Edit" drop down in select the option for "Paste".

  4. 4

    Click the "File" drop down and select the option for "Save". Save the file as "0.reg" to the "C:" drive.

  5. 5

    Click the "File" drop down menu and select the option for "New".

  6. 6

    Highlight "Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR]

    "Start"=dword:00000003"

    and select "Copy" from the context menu. Paste the text into Notepad and save the file as "1.reg" to the "C:" drive.

  7. 7

    Click the "File" drop down menu and select the option for "New".

  8. 8

    Highlight "@echo off

    cls

    regedit /s 0. reg

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /deny=system

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /deny=users

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /deny=administrators

    echo.

    echo Disabled

    echo.

    //pause

    " and select "Copy" from the context menu. Paste the text into Notepad and save the file to your "C:" as "Disable.bat"

  9. 9

    Click the "File" drop down menu and select the option for "New".

  10. 10

    Highlight "@echo off

    cls

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /grant=system

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /grant=users

    subinacl.exe /keyreg systemcurrentcontrolsetservicesusbstor /grant=administrators

    regedit /s 1. reg

    echo.

    echo Enabled

    echo.

    //pause

    " and select "Copy" from the context menu. Paste the text into Notepad and save the file to your "C:" as "Enable.bat".

  11. 11

    Double-click the "Disable.bat" file to turn off the USB port. Click the "Enable.bat" file to turn the port back on to complete the reset.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.