Write Protect USB Drive Or Prevent Connection And AutoRun

USB Write Protect is a free portable utility program to protect files in your USB drives from being accidentally modified or deleted.

It can also prevent an unauthorized user from connecting their own USB drive to copy your files and it can disable the drive’s Autorun function.

USB Write Protect Features

The program has a number of useful security features:

USB Device Write Protection – Enable this to prevent files on any USB storage device from being accidentally modified or deleted (and to protect against malware infecting the USB drive).

USB Device Lock – Lock to prevent any USB storage device from being connected to the computer. You will not be able to read from or write to any USB storage devices – they will not show up in Disk Management or (My) Computer / File Explorer either.

USB Device Autorun – Disable to prevent USB devices from automatically running programs (primarily a security benefit – stops malware autorun and transfer to your computer). Note: this will prevent Autorun of all external devices – including DVD drives.

Tip: to help prevent infection of your USB drive by a virus on a different computer, create an empty folder called autorun.inf in the root of your USB drive.

Password – this is designed to prevent anyone changing your program settings but it can be overridden by a blank password so isn’t really of much benefit. The best way to protect the program settings is to just store the program in a really obscure directory, not in your Downloads or Documents folder…

Using USB Write Protect

Download the USB WriteProtect v2.0 program from the developer here in a zip file – currently the fourth program on the page.

  • Unzip (extract) the USBWriteProtect.exe program to your computer – don’t save and run it from your USB flash drive or you could lock yourself out of the drive (you’d then have to re-download the program and run it from your computer to unlock it…)
  • Run the USBWriteProtect.exe program (if using Windows 10, 8 , 7 or Vista you must right click the program and select ‘Run as administrator’) – the main window opens as shown in the example below:

Using USB Write Protect

  • Select from the 3 options as required:

If you wanted maximum possible security, you would set Write Protection to ‘Enabled’, Device Lock to ‘Locked’ and Device Autorun to ‘Disabled’.

The program also lists USB storage devices that are currently plugged in – if there are any, they will need to be removed and re-inserted before any changes to them can take effect.

Important: like all such programs, it can only protect USB drives on the same computer that you run the program on – if you take the USB drive to a different computer it will no longer be protected.

To achieve write protection of a USB Flash drive on all computers, you would need a USB drive with a hardware switch to disable writing to the drive – these are quite rare nowadays but one with decent reviews at Amazon is the Kanguru Flashblu flash drive.

Alternatively, follow my memory card guide and use a memory card instead because they do have a write protect switch.

Tech Notes (How The Program Works)

The program works by changing some standard Windows registry settings – you could make these changes yourself but it is more complicated than using the simple interface of the USB Write Protect program.

However, advanced users or techs may be interested in which registry keys control these settings – you can edit them using Regedit as follows:

USB Device Write ProtectionNavigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies – you may need to create this StorageDevicePolicies key if it is not already present.

Right click this key and create a New DWORD Value – name the entry WriteProtect. Then edit the new WriteProtect entry and change the value from 0 to 1. (1 disables writing to all USB devices, 0 enables writing to all USB devices).

USB Device Lock Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor and change the value of Start from 3 to 4. (4 prevents any USB storage device being connected to the computer, 3 allows any USB device to be connected).

USB Device AutorunNavigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and make a note of the default value of NoDriveTypeAutoRun – it is different in each version of Windows.

Now change its value to a hex value of 0xFF (255 decimal). 0xFF disables Autorun on all kinds of drive – change it back to the previous default value to enable Autorun again.

Conclusion

USB Write Protect is a neat little portable program that makes it simple to configure security options for all USB storage devices on a computer.