How to Disable USB ports on Windows PC via Registry

You can disable access to your USB(Universal Serial Bus) ports on your Windows based PC to prevent people from taking out Your Important data without permission or spreading viruses through the use of USB (pen and flash) drives.

How to use of this trick to disable USB ports,These are following steps given below:-

  • Click on Start button(window Button).
  • Click on Run. If you cannot find RUN, type it in the search box.(ShortCut Key => Window key + R)
  • Type regedit.If you cannot find regedit, type it in the search box
  • Navigate to
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbstor
  • In the work area,double click on Start.
  • In the Value Data box,enter 4 to Disable USB ports
  • Click on OK.
  • Close Registry Editor and refresh your desktop.(or a restart your computer))
  • To re-enable access to your USB ports,enter 3 in the Value Data box in Step 6.

Try it yourself to make your PC invulnerable from data theft and malware which spread through USB ports.This works on Windows XP, Windows Vista, Windows 7 and Windows 8.

Note: This trick also disables access to your USB connected peripheral devices. So, do not use it if you have USB connected keyboard and mouse.

For References :-

I hope you enjoyed this article.

Sharing is caring


About Author

Akash is a co-founder and an aspiring entrepreneur who keeps a close eye on open source, tech giants, and security. Get in touch with him by sending an email (

You may also like :-

Leave a Comment

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

Stay Connected

Popular Posts

Get Latest Stuff Through Email

Who Should Read TechTrick?

All the tricks and tips that TechTrick provides only for educational purpose. If you choose to use the information in TechTrick to break into computer systems maliciously and without authorization, you are on your own. Neither I (TechTrick Admin) nor anyone else associated with TechTrick shall be liable. We are not responsibe for any issues that caused due to informations provided here. So, Try yourself and see the results. You are not losing anything by trying... We are humans, Mistakes are quite natural. Here on TechTrick also have many mistakes..