2

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
  • Most reliable and secure way to disable USB port is to cut wires to on-board USB connector. :-) Apr 25, 2020 at 19:24

1 Answer 1

0

Changing the value of Start to 4 in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR will 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 Deny permissions 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .