How to disable USB port?

I know how to change registry key value name's data and if you want to disable USB port then change Start value name's data to 4 in the registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR

But as soon I change its values it prints operation successfully and after that operation, it overwrites this value to 3 automatically.

How to fix this?

1

1 Answer

Changing the value of Start to 4 inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTORwill only work if the USB storage driver is already installed. If it has not yet been installed, Windows plug & play subsystem automatically resets the Start value to 3 (Manual) when it installs USBSTOR when a USB storage device is plugged in for the first time.

A stronger method is given in the Microsoft article
How can I prevent users from connecting to a USB storage device?

This method assigns the user or the group and the local SYSTEM account Denypermissions to the following files:

  • %SystemRoot%\Inf\Usbstor.pnf
  • %SystemRoot%\Inf\Usbstor.inf

See the article for details for doing that.

Another simpler method uses the Group Policy Editor (gpedit.msc):
Go to Computer Configuration > Administrative Templates > System > Removable Storage Access and set the required policy:

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like