Skip to main content


Enable USB Write Protection Via The Registry



The Windows Registry, Is a very powerful tool to perform an array of edits and tweaks dedicated to the device on which It's applied. One of these tweaks that I'll cover In this tutorial, Is to enable write protection on all USB ports. Essentially, the contents of any USB device that's plugged Into the computer, will be "read only", meaning all stored data cannot be edited or deleted. Any attempt to do so, will be denied by the operating system.


I've already documented a guide on how to do this by using the good old Group Policy Editor. However the GPE Is only native to the Windows 10 Pro, Enterprise and Education editions and not every user has either of these editions Installed, hence my decision to apply this tweak via the Registry.

This comes to very good use (as an example) for anyone who has physical access to your PC, plugs In your USB stick that you've left lying around and attempts to edit or delete files. In doing so, an error message will be returned denying such operations. So let's rip Into this guide.

Step One:
To access the Windows Registry, open the Run menu, type "regedit" (no quotes) and hit "OK".



Step Two:
Next, navigate to the following directory:
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control"

Right-click the "Control" folder and select "New > Key" as Illustrated below.



Step Three:
Name the key (that you've just created In the above step), as "StorageDevicePolicies", again without the quotes.



Step Four:
Right-click "StorageDevicePolicies", and select "New > DWORD (32-bit) Value".



Step Five:
Name the Value (that you've just created above), as "WriteProtect" without quotes. The result will look like the Image below.



Step Six:
Double-click "WriteProtect" and In the Value data field, give It a value of 1. Click "OK" to finalize the process.



Last Step:
A reboot Is not required, nor the need to log off & log on. Now to put this to the test. I've attempted to add and edit a file on my USB stick, and as you can see, the message of "The disk Is write-protected" Is displayed. Perfect!



Final Thoughts:
As mentioned at the beginning of this article, this tweak Is only dedicated to the computer on which It's applied to. It does not write-protect the USB device Itself, but certainly prevents any changes to the device when plugged Into "any" USB port. To reverse the change, go back to Step Six above, and In the Value data field, give It a value of 0.

The Windows Registry Is a critical part of the operating system and any Incorrect edits, can cause significant system Instability and/or loss of functionality to your operating system. For this very reason, I strongly suggest backing It up prior to any edits, by using It's Export feature.



Comments

Popular posts from this blog

How To Decode The Windows 10 Product Key

Every Windows 10 operating system that's Installed and activated on the computer, has what's called a Product Key, that Is either pre-Installed by the manufacturer, or added by the end user when formatting their PC. In order to have a fully-functional OS, It must contain a valid Product Key. Whilst there are many tools that can extract It from the operating system, In this tutorial, I will show you how to manually decode the Product Key.

How To Rename Any Power Plan In Windows 10

In terms of managing and controlling the way your computer utilizes power during It's computing operations, Windows has built-In power plans, that are basically a collection of hardware and system settings. By default, there are three In total, namely Balanced, Power Saver and High Performance. Whilst you can change the plan Itself, there's no option to do the same with It's name, hence In this tutorial, I will show you how to rename any power plan In Windows 10.

How To Create A Fake File Of Any File Size

Depending on your business environment or Individual requirements, sometimes there Is the need to test files of a given capacity. Such tests can Include Identifying how well your hard disks perform under heavy read/write operations, or to establish whether files can be securely deleted beyond recovery. Whatever the reason may be, In this tutorial, I will show you how to create a fake file of any file size.