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 Use Sandboxie In Windows 10

When navigating online and downloading & executing applications, clicking on links, visiting websites that you're not familiar with and so forth, your computer Is vulnerable to being Infected with a virus. The last thing you need, Is to have your sensitive files compromised or hit with a nasty piece of malware. To prevent this, In this tutorial, I will show you how to safely perform all the above and more, by using a software named Sandboxie.

Create A Bootable USB Flash Drive

If you have a Bootable ISO Image file of the Windows operating system, obviously the Intention Is to burn It to disc and boot from your PC thereafter. However, optical drives are slowly being phased out In manufacturing & shipping of new computers, so what do you do from here? The alternative Is to create a bootable USB flash drive, and I will show you exactly how It's done. The process Is quite simple, yet a lot of users fail to grasp the concept.


Open The Command Prompt In Any Directory

A very powerful tool native to the Windows platform, Is the Command Prompt that allows users to perform an array of tasks, such as renaming and deleting files & folders, formatting disks and the list goes on. Sometimes, you need to navigate to certain directories by executing commands, which can be a lengthy and somewhat frustrating process. As such, In this tutorial, I will show you how to easily open the Command Prompt In any directory/folder of your choice.