Locking and unlocking USB ports in Windows 10 can be useful for security purposes, especially in shared or public environments. This can help prevent unauthorized access to your system through USB devices. Below, I will guide you through the process of locking and unlocking USB ports using the Registry Editor and Group Policy Editor.
Method 1: Using the Registry Editor
Locking USB Ports
- Open Registry Editor:
- Press
Windows + Rto open the Run dialog box. - Type
regeditand press Enter.
- Navigate to USB Policies:
- In the Registry Editor, navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
- Create or Modify the
StartValue:
- In the right pane, look for the
Startvalue. If it does not exist, create a new DWORD (32-bit) Value and name itStart. - Double-click the
Startvalue and set its value data to4(this disables USB storage devices).
- Restart Your Computer:
- Close the Registry Editor and restart your computer for the changes to take effect.
Unlocking USB Ports
- Open Registry Editor:
- Press
Windows + R, typeregedit, and press Enter.
- Navigate to USB Policies:
- Go to the same key as before:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor
- Modify the
StartValue:
- Double-click the
Startvalue and set its value data back to3(this enables USB storage devices).
- Restart Your Computer:
- Close the Registry Editor and restart your computer for the changes to take effect.
Method 2: Using Group Policy Editor (Windows 10 Pro, Enterprise, and Education)
Locking USB Ports
- Open Group Policy Editor:
- Press
Windows + R, typegpedit.msc, and press Enter.
- Navigate to USB Policies:
- In the Group Policy Editor, navigate to Computer Configuration > Administrative Templates > System > Removable Storage Access.
- Disable USB Storage:
- Find the policy named “Removable Disks: Deny read access” and “Removable Disks: Deny write access”.
- Double-click each policy and set it to Enabled.
- Click Apply and OK.
- Restart Your Computer:
- Close the Group Policy Editor and restart your computer for the changes to take effect.
Unlocking USB Ports
- Open Group Policy Editor:
- Press
Windows + R, typegpedit.msc, and press Enter.
- Navigate to USB Policies:
- Go to the same location as before:
Computer Configuration > Administrative Templates > System > Removable Storage Access
- Enable USB Storage:
- Double-click the policies “Removable Disks: Deny read access” and “Removable Disks: Deny write access”.
- Set each policy to Disabled.
- Click Apply and OK.
- Restart Your Computer:
- Close the Group Policy Editor and restart your computer for the changes to take effect.
Method 3: Using Device Manager (Temporary Lock)
- Open Device Manager:
- Press
Windows + Xand select Device Manager.
- Disable USB Controllers:
- Expand the Universal Serial Bus controllers section.
- Right-click on each USB controller and select Disable device.
- Enable USB Controllers:
- To re-enable the USB ports, right-click on each USB controller and select Enable device.
Conclusion
Locking and unlocking USB ports in Windows 10 can be done using the Registry Editor, Group Policy Editor, or Device Manager. Each method has its own advantages and is suitable for different user scenarios. The Registry Editor and Group Policy Editor provide a more permanent solution, while Device Manager allows for quick, temporary disabling of USB ports. Choose the method that best fits your needs and system configuration. Regularly managing USB port access can help enhance the security of your Windows 10 system.