How to Disable Enable USB Port in Windows 7 & Windows 8


Let me explain the simple steps to Disable Enable USB Ports in your Laptop or Desktop PC. Usually companies Block or turn off USB Ports to protect confidential data. But here is a simple workaround to enable your USB ports, access it  and disable or block USB Ports easily.

Free Download : USB Lock/Unlock  USB Ports in 1-Click

Unlocking  or Enable USB Ports in Windows requires simple tweak in the Windows Registry Editor. You have to edit your registry to Lock/Unlock your USB Ports.

How to Turn Off or Disable Enable USB Ports in Windows

Step1: In Windows 7 and Windows 8, press Windows key+R and type as “regedit”

Edit Registry in Windows

Step 2: It will open the Registry Editor of  your Windows 7 or Windows 8 in your Laptop or Desktop PC

USB Registry Editor in Windows

Step 3: After opening Registry editor, browse the following path in right side navigation bar on your registry editor

The Path to go: “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR”

Step4: Then right click the registry “Start” which is rectangled in red color in the below screenshot of registry editor

Turn Off USB Ports in Windows

Step:5 Right Click “Start” and Click modify

  • To enable USB ports: change the value from “4” to “3”
  • To disable USB ports: change the Value for “3” to “4”

Enable Disable USB Ports

Alternative Methods to Disable Enable USB Ports

1. You can also disable USB ports by uninstalling USB Mass Storage Drivers from Windows.

2. You can Turn off or Enable USB Ports using Windows Device Manager.


  1. hi,
    Please help me in this i have disabled the usb port it worked succesfully.. but the problem is when connect dongle its detecting i want to block it also help out in this please

  2. hi
    how i can enable my USB port,since my mouse and keyboard is not working or no i cannot enable my usb…is thr any idae?window 7 with core i3

  3. Hi i cant use ANY usb items on my computer i have changed it from 4 to 3 and that didnt work so i changed it from 3 to 4 and that also didnt work i dont know what is wrong with my computer i was wondering if you know a way that i can fix my usb port for free thank you

  4. Hi,
    I cannot access my USB flash drive. Although the usb mouse and keyboards are working.I have also seen in regedit the number over there is 3.
    Please help.

  5. can i disable the usb port for usage of pendrives but leave it enabled for using printers

  6. Im not able to unlock this..
    The Error IS ” Cannot edit Start: Error writing the value’s new contents.”…
    plz suggest if u can slove this issue.

  7. Do we need to restart the system after these steps…??

  8. Dear sir,
    very very thanks for your kind help ….its realy worked ..

  9. Hey even after that changing of value, we need to change the permissions of the USBSTOR.
    For this, u need to go to Run->inf..
    then select usbstor nd usbstor.(smthing)simultaneously n right click then properties then permissions and full control.

  10. this is too useful to making deny of service for an unauthorized user………………..

  11. i’m trying to enable the usb port but there’s an error message.

    Error editing value:
    Cannot edit start: error writing the value’s new contents.

  12. We modified the registry via Group Policy. However, when we stick a thumbdrive in it changes ‘4’ back to ‘3.’ If I run gpupdate, the key changes back to ‘4.’ And the cycle repeats. Any ideas on why this is happening?

  13. Hi All,

    Although I have admin rights but when I tried to copy/cut data from pen drive (or any USB data storage), I am getting permission denied message “You will need to provide administrator access to copy file”.
    I am using Windows 7.

  14. I protected USB device with USB Guard then I deleted the software ……now I can’t see access the Drive letter ,how to repair manually

  15. Locked the USB ports in windows

  16. I did it but if i use different device then automatically the value changes.

    So what can i do?

  17. no use error “OfficeScan detected unauthorized access to devices connected to your computer”. through Trend Micro anti virus.

    solve this problem

    giv rply

    • Yes. Its not a big issue. The tool just going to access your registry. If you are concerned about your anti virus message, do the steps manually.

  18. theirs no changes alot..

  19. i’m trying to enable the usb port but there’s an error message.

    Error editing value:
    Cannot edit start: error writing the value’s new contents.

  20. After we disabled the USB port, can the mouse (which attached through the USB port) operates?

  21. thanks brother it worked…
    keep posting.

  22. how to block the usb port in linux

  23. hi!! Thanks a tonne…this really worked! 😉

  24. My machine shows 3 for the services – USBSTOR – start, but still it does not detect storage devices. Any Idea what should be done?

    & also checked whether that its enabled in device manager..

    plz reply

  25. hey thanks alot dear
    i was thinking if u could also tell me a solution to block cd-rom drive the same way usb is blocked
    beast regard
    Abdul wahid

  26. Does this mean that all the usb ports will be disabled and enabled at a time? What if we want to use the usb mouse but want to block the other usb ports. Is there any way to block each usb separately.

    • u can use ur USB Mouse.. it only blocks the visibility of the USB drvies that u may use it with Pen drives to copy files…

      It only protects pen drive usage…You can use USB Mouse and keyboard..But cant use Pen drives aND card reader

  27. this is very useful to me thanks and regards lokesh

  28. Dear Sir/Mada,
    thanx for helped me for finding the solutions.
    Its very easy & powerful mehtod.

    with regards
    Mahesh kumar

  29. Dear Admin,

    Found it very useful, exactly what I was looking for.

    Cheers to you. :)

  30. My machine shows 3 for the services – USBSTOR – start, but still it does not detect storage devices. Any Idea what should be done?

  31. sir its very nice…..thanx for sahring this

  32. That was nice. Quite in line with what i sought for

  33. thanks……

  34. Increase Windows 7 boot speed. Though compared with Vista, Windows 7 boots significantly faster, there are still some ways to further improve its performance: Click “Start” -> type ‘msconfig’ in the search box and press “Enter”(you could also press “[WIN] +R” to open Run window) -> select “Boot” and then “Timeout” tab. If you have only installed Windows operating system, directly set it to 3s from the default 30s; if you have multiple operating systems installed on your computer, first set the value to the desired amount of seconds you would like to have at boot time and then check “No GUI Boot” tab. Then click on “Advanced Options” to set the “Number of processors” to the highest number available.

  35. This one works only 4 already used Usb drives. But it couldn’t works if u use the new Usb drive which ur going to use first time with ur lapi/pc? Plz giv me another sol 4 this:-).

  36. This is just the sort of info I was looking for! Thanks :)

  37. Thank you for such a good blog.

  38. Your blog is very interesting, i have bookmarked your site for future reference :)

  39. Dear admin, thnx for sharing this blog post. I found it wonderful. Best regards, Victoria…

Leave a Reply

Your email address will not be published. Required fields are marked *