Write Protect USB › Windows guide
How to Enable Write Protection on a USB Drive
A USB stick that nobody can change is a different thing from a USB stick that nobody can open. Windows can make a drive read-only three ways: for the whole PC, for one disk, or inside the stick with a slider. The scope you choose decides who is protected, and that is where most guides go wrong.
To enable write protection on a USB drive in Windows, set WriteProtect to 1 under HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies (works on Home and Pro), or switch on the Group Policy setting Removable Disks: Deny write access (Pro and above). Reconnect the drive, then try saving a file to confirm. A drive with a hardware slider only needs the slider moved.
| Fastest method | Hardware slider, or one PowerShell line per disk |
|---|---|
| Works on Windows Home | Registry, diskpart, PowerShell, slider; not the Group Policy editor |
| You need | Administrator rights and about five minutes |
| Undo it with | The same setting set back to 0, then reconnect the drive |
| Last verified | November 2026 |
Pick your path
The answer
How to Enable Write Protection on a USB Drive — Quick Answer
Enable write protection on a USB drive by making Windows refuse writes at one of three scopes: the whole PC through a registry value or Group Policy, one disk through diskpart or PowerShell, or the device itself through its hardware slider. Reconnect the drive afterwards and test with a new file.
Windows draws the line between reading and writing in its storage stack, and each method below moves that line at a different place. Setting WriteProtect to 1 makes every USB storage device on that PC read-only. The Group Policy setting Removable Disks: Deny write access does the same for removable disks and can be managed centrally. diskpart and Set-Disk mark a single disk read-only. A slider on the drive cuts writes before Windows is even involved.
The Three Scopes Rule
Name the scope before you touch a setting: this PC, this disk, or this stick. A lock set for the PC protects nobody else’s computer. A lock inside the stick protects it everywhere but cannot be added to a drive that lacks the hardware. Most failed attempts trace to a mismatch between the scope someone needed and the one they set.
Requirements and Windows edition note
Every software method needs an administrator account. Windows Home has no Local Group Policy Editor, so Home users take the registry route, diskpart or PowerShell. Windows Pro, Enterprise and Education add the editor and domain-managed policy. Before you start, create a restore point and keep a second administrator account, because a mistyped value can lock you out of your own drives.
Admin rights and rollback plan
Write down the old value of anything you change. The registry key may not exist yet, which is normal: create it, and delete it again to roll back. For Group Policy, note the original state, usually Not Configured, so the undo is one click.
Methods
Step-by-Step: Enable Write Protection on a USB Drive
Five working routes exist, and each steps through in under five minutes: a registry value for the whole PC, a Group Policy setting on Pro editions, diskpart or PowerShell for a single disk, and a hardware slider on the stick. Follow the tab that matches your Windows edition and the scope you need.
Registry method: the WriteProtect value
- Open Registry Editor as administratorPress Win + R, type
regeditand approve the prompt. - Go to the StorageDevicePolicies keyBrowse to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control. IfStorageDevicePoliciesis missing, right-click Control, choose New › Key and name it exactly that. - Create the WriteProtect valueInside the key, add a DWORD (32-bit) named
WriteProtectand set it to1. - Reconnect the driveUnplug the stick, plug it back in and run the checks in the verification section.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000001Scope: every USB storage device on this PC. Difficulty: easy. Time: about three minutes.
Group Policy: Removable Disks, Deny write access
- Open the Local Group Policy EditorPress Win + R, type
gpedit.msc. Pro, Enterprise and Education only. - Find the settingGo to Computer Configuration › Administrative Templates › System › Removable Storage Access.
- Enable the deny ruleOpen Removable Disks: Deny write access, choose Enabled and apply. Add WPD Devices: Deny write access if phones and media players should be read-only too.
- Refresh policyRun
gpupdate /forcein an administrator prompt, then reconnect the drive.
Scope: removable disks on this PC, or every PC in a domain when set centrally. Difficulty: easy to moderate. Time: about five minutes.
diskpart: make one disk read-only
- List the disksOpen an administrator Command Prompt, run
diskpart, thenlist disk. Match the USB stick by its size. - Select itRun
select disk Nusing that number. Selecting the wrong disk is the one real risk here, so re-read the size before you continue. - Set the attributeRun
attributes disk set readonly, thenattributes diskto confirm that Current Read-only State says Yes.
diskpart
list disk
select disk 2
attributes disk set readonly
attributes disk
exitScope: one disk on this PC. Windows enforces the attribute here, so check the drive on a second computer before assuming the lock travels with it.
PowerShell: Set-Disk
- Open PowerShell as administratorRight-click Start and choose Terminal (Admin) or Windows PowerShell (Admin).
- Identify the diskList disks and read the
BusTypeandSizecolumns so you pick the stick and not an internal drive. - Mark it read-onlyRun
Set-Disk -Number N -IsReadOnly $truewith your number.
Get-Disk | Format-Table Number, FriendlyName, BusType, Size, IsReadOnly
Set-Disk -Number 2 -IsReadOnly $trueScope: one disk. Easier to script across several PCs than diskpart, and the IsReadOnly column gives a clear yes or no afterwards.
Hardware slider on the drive or card
- Look for the switchSome USB sticks have a small slider on the body, and SD cards have a lock tab on the left edge.
- Slide it to the locked positionDo it before you plug the drive in. Moving it while mounted can confuse some readers.
- Test on the PC you care aboutTry saving a file. A few card readers ignore the SD tab, which is worth knowing before you trust it.
Scope: the drive itself, on any computer. See the write-protect switch guide for models, the SD tab and what to do when the slider fails.
Export the key you are about to change (File › Export in Registry Editor) and note where it went. Registry edits take effect on the live system, and a typo in the wrong hive is hard to trace.
Build your .reg file
Tick what you want and copy the result. Nothing leaves your browser, and it only writes text; you review and import it yourself.
; Tick at least one option above to generate a .reg file.Selected: none
Free options
Best Free Methods to Enable Write Protection on a USB Drive
Free methods cover almost every case: the registry value and PowerShell work on any Windows edition, Group Policy adds a managed option on Pro and above, and diskpart suits one-off jobs. What changes between them is scope, not cost, so choose by who needs protecting.
None of the dependable ways to make a stick read-only costs anything, and four of them need no download. The decision comes down to scope and edition, not price.
| Method | Scope | Works on Home | Reversible with |
|---|---|---|---|
Registry WriteProtect | Every USB storage device on this PC | Yes | Value set to 0, then reconnect |
| Group Policy deny write | Removable disks on this PC or a domain | Editor missing | Not Configured, then gpupdate |
diskpart readonly | One disk | Yes | attributes disk clear readonly |
PowerShell Set-Disk | One disk | Yes | Set-Disk -IsReadOnly $false |
| Hardware slider | The stick, on any PC | Yes | Slide it back |
- The lock is enforced by Windows itself
- No installer, no background service
- Settings are plain text you can audit
- No per-drive allow-list in Home
- No log of who plugged in what
- No password in front of the setting
Need it today on one PC? Use the registry value. Need it on one stick only? Use PowerShell. Need it on every PC? Buy a drive with a slider.
Avoid these
Common Mistakes When You Enable Write Protection on a USB Drive
Five errors account for most failed attempts: setting the wrong scope, selecting the wrong disk in diskpart, skipping the reconnect, leaving daily use on an administrator account, and confusing read-only with blocked or hidden. Each is easy to avoid once you know it exists.
Editing the registry on your own PC and expecting the stick to be locked on a colleague’s laptop. The value lives in your Windows installation, not on the drive.
Running select disk 0 by habit in diskpart. Disk 0 is normally the system drive, so always read the size column before selecting.
Testing without reconnecting. A drive that was already mounted keeps its old state until you unplug it.
Leaving the daily account as an administrator. Any admin can reverse the lock in a minute, so the control only holds against standard users.
Restarting Windows after the registry edit. A reconnect is normally enough; restart only if the drive still writes.
One more slip is mixing up write protection and blocking. Setting USBSTOR to Start=4 hides every drive, which a person who wanted read-only access will read as a broken port. The comparison table shows which setting does which.
Checks
How to Verify It Worked After You Enable Write Protection on a USB Drive
Verify the lock with three checks in order: create a file, edit an existing one, then read the IsReadOnly column from PowerShell. A working lock refuses both writes, usually with error 0x80070013, and the column shows True. Anything else means the scope or the disk number was wrong.
Three quick tests tell you more than the settings screen does. First, create a file; second, edit a file; third, read the state from PowerShell. Do them in that order, because the first two show what a user would experience and the third shows what Windows recorded.
- Reconnect the driveUnplug it and plug it back in so Windows reads the new state.
- Try to create a fileRight-click inside the drive window and choose New › Text Document. A locked drive refuses with The disk is write protected.
- Edit an existing fileChange one character in a file already on the drive and save. Expect the same refusal.
- Read the state in PowerShellRun the line below and look for
Truein theIsReadOnlycolumn.
Get-Disk | Where-Object BusType -eq 'USB' | Format-Table Number, FriendlyName, IsReadOnlyTest only on drives you own or administer. Use a spare copy of your data when you are experimenting with values for the first time.
Did it work? A yes/no check
Answer from what you see on screen.
Create a new text file on the drive. Does Windows refuse with a “write protected” message?
Open an existing file, change one character and save. Is that refused too?
Unplug the drive, plug it back in, and try once more. Still saved?
Protected. Windows is refusing writes. Run Get-Disk once to record the state, then you are done.
Partly protected. Some apps cache a save until you close them. Close the app, reopen the file and look at its contents, then try again.
Not protected. The setting is the wrong scope, mistyped, or the drive was not the disk you targeted. Re-read the method steps and compare the value with what you set.
Next steps
Is This Enough? What Else to Do After You Enable Write Protection on a USB Drive
Not on its own. Write protection stops changes and new files, but anyone can still read and copy what is on the drive, and nothing records who plugged it in. Add encryption for loss, an approved-drive list for outsiders and logging for accountability.
Write protection answers one question, whether data on the drive can change. It leaves three others open: who can read the files, whether a device was plugged in, and what happens when the lock is switched off.
What to add next
- Encryption or a password if the drive could be lost or stolen.
- An approved-drive list if outsiders plug in to your PCs; see the allow-list section.
- Activity logging so you can answer “who plugged in what and when” later.
- A standard-user daily account so a lock set by an administrator stays set.
Logging and auditing USB activity
Windows records device installs in the Event Viewer under Microsoft-Windows-DriverFrameworks-UserMode/Operational, which you can enable for each plug-in. Dedicated blockers keep a simpler report with the device name, time and whether access was allowed.
How exposed are your USB habits?
Four quick questions. Higher means more exposure.
Why it matters
Why Block USB Ports at All
A USB drive is the cheapest way to move gigabytes off a PC without a network, which makes it equally good for honest backups and for careless or hostile copying. Blocking ports or making drives read-only narrows that path without removing the keyboard, mouse or printer.
Plug-in storage is the quietest route out of a PC. A drive the size of a thumb carries gigabytes, needs no network and leaves little trace by default. Blocking or write-protecting ports is one control among several, and it pays off most where several people touch the same machine.
USB data theft and insider-risk basics
The risk runs in both directions: files leave on a stick, and unknown files arrive. Most real incidents are careless rather than hostile, a work file copied to a personal drive or a stick found in a car park. Read-only and allow-list controls reduce both paths.
How autorun malware spreads
Older Windows versions ran an autorun.inf file on a drive the moment it was attached, which made USB sticks a favourite carrier. Modern Windows no longer autoruns code from USB storage, but infected files can still be opened by a person, and a writable drive lets a compromised PC copy itself onto every stick that touches it. Write protection closes that second path.
How USB port blocking differs from disabling a single device
Disabling one device in Device Manager affects that device instance only; the next stick is a new device and works. Blocking the storage class or driver affects every drive, current and future. Blocking is a coarse tool, so reach for it when you can describe who should use USB storage, and for anyone else it should read as off.
Allow keyboard and mouse while blocking storage
Human-interface devices load their own driver, so storage rules leave them alone. The table lists what each class does when you block storage.
| Device class | Storage block (USBSTOR Start=4) | Removable deny-all policy | Notes |
|---|---|---|---|
| USB flash drive or external disk | Blocked | Blocked | The main target |
| Keyboard and mouse (HID) | Works | Works | Separate driver |
| Printer | Works | Works | Print class, not storage |
| Phone or media player (MTP) | Check | Blocked | Needs the WPD policy; charging continues |
| Card reader | Blocked | Blocked | Presents as storage |
Compare
Built-in Windows Methods Compared
Windows ships six ways to restrict a USB drive, and they differ in scope, edition support and whether reading survives. The registry value and Group Policy rule make every USB disk read-only, diskpart and Set-Disk target one disk, USBSTOR blocks everything, and Device Manager affects a single device.
| Method | Difficulty | Scope | Cost | Best for | Limits |
|---|---|---|---|---|---|
Registry WriteProtect | Easy | All USB storage on the PC | Free | One home or office PC | All-or-nothing; any admin can reverse it |
| Group Policy deny write | Easy to moderate | Removable disks, per PC or domain | Free | Managed offices on Pro and above | No editor on Home |
Registry USBSTOR Start=4 | Moderate | All USB storage, read and write | Free | Kiosks and locked-down PCs | Blocks reading as well; reverts with Start=3 |
| Device Manager disable | Easy | One device instance | Free | A single stuck port or device | The next drive works again |
diskpart or Set-Disk | Moderate | One disk | Free | Locking one backup stick | Wrong disk number is the main risk |
| Hardware slider | Easiest | The stick itself | Cost of the drive | Shared or travelling drives | Not every stick has one |
| Our reading | Start with the slider | Then the registry | Free | Most readers | Use blocking software only if you need a list |
Group Policy vs registry vs software-based control
Group Policy writes the same registry values you could set by hand, with a friendlier front end and domain deployment. Registry edits are universal and scriptable. Software-based control adds the layer Windows lacks: an approved-device list, a password in front of the setting and a log. Pick the thinnest tool that still answers your question; for one PC that is the registry, for a fleet it is policy, and for a mixed set of known and unknown sticks it is software.
Registry USBSTOR method explained
The USBSTOR service loads the driver that exposes USB storage. Setting its Start value to 4 prevents it loading, so no drive mounts, and 3 restores it. Because it blocks reading too, it is a blocking method rather than a read-only one. The walkthrough on disabling USB drives through the registry, Group Policy and Device Manager lays out the same switches from an administrator’s side.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=dword:00000004Method picker
Answer three questions for the method that fits.
Software route
Software-Based USB Blocking Step-by-Step
Install the blocker, tick the device types to stop, set a password, add trusted drives to the allow-list and confirm that a blocked attempt appears in the log. The whole routine takes about ten minutes on one PC and replaces several registry edits with switches.
Software blockers install a small service and give you toggles instead of registry keys. The steps below use USB Block because its documented Control Center matches the task, and the pattern is the same for any similar tool. The product blocks access; it does not offer a read-only mode, so treat it as the right tool when “none” is the answer and not “read but do not change”.
- Install from the official sourceDownload the Windows installer from the official download page and run it as an administrator.
- Set the protection switchesIn Control Center, tick what to stop: USB drives and memory cards, discs and floppies, network drives or non-system drives.
- Set a passwordUse Program Options to add a password so another user cannot switch protection off. Note it somewhere safe.
- Review Authorized DevicesPlug in the drives you trust and add them to the list, so they keep working while others stay blocked.
- Check the reportOpen Reports and Logs and confirm that a blocked attempt appears with a time.
Software blocking suits PCs where you know which drives are legitimate. If you only need existing files left unchanged, the earlier registry or PowerShell methods are the closer match.

Allow-list
How to Allow Approved Drives Only
Allow only approved drives by denying all removable storage and then listing the exceptions, either natively through Device Installation Restrictions using hardware IDs or through a blocker’s authorized-devices list. The list approach is faster for one or two business drives on a handful of PCs.
An allow-list inverts the problem. Instead of listing what is banned, you name the drives that are permitted and refuse the rest. Windows can do this natively with Device Installation Restrictions in Group Policy, using hardware IDs, and the approach pays off where one or two business drives should work and everything else should not.
USB whitelisting for approved drives
Native allow-listing needs each drive’s hardware ID, a deny-all rule and an exception for the listed IDs. Errors lock out the wrong device, so test on a lab machine first. A blocker with an authorized-devices screen records the serial and removes the guesswork; you plug the drive in and add it.
Shared, school and kiosk PCs
On a PC several people use, the default state should be locked and the approved drive the exception. Keep the admin account separate and the allow-list short, because every entry is a trust decision.
Apply blocking and monitoring to PCs you own or administer, with the knowledge of their users. Do not use any of this to restrict or watch people who have not been told.

Undo
How to Re-enable USB Ports Safely
Reverse each change you made and nothing more: WriteProtect back to 0, USBSTOR Start back to 3, Group Policy items to Not Configured, the disk read-only attribute cleared. Then refresh policy, reconnect the drive and save a throwaway file to confirm.
Undoing a lock is the same edit run in reverse, and the order matters less than writing down each change when you make it. Re-enable as the administrator who set the control, because a standard user cannot touch these keys.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=dword:00000003Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"=dword:00000000gpupdate /force
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices" /sCheck for a hardware slider and a read-only disk attribute before assuming the setting did not apply. The fix guide orders the checks from cheapest to costliest.
Re-enable checklist
Tick each step as you finish it; this list prints cleanly.
Our recommendation
Where USB Block Fits, and Where It Does Not
USB Block fits when the goal is to stop all USB storage except named drives, and it does not fit when the goal is read-only access. We recommend it for that narrower job, with a password and a log, and we point to free built-in methods for plain write protection.
For most readers the registry value, PowerShell or a drive with a slider is the right answer, and no software is needed. Blocking software earns its place when the answer is “no storage at all, except these named drives”, which is a different job from write protection.
That job is what USB Block’s device blocking and allow-list is built for. It blocks USB drives and memory cards, discs, network drives and non-system drives from a single Control Center, keeps an authorized-devices list and writes a log. We publish it, so weigh that when you read this section.
- PCs with known approved drives
- A password in front of the settings
- A report of blocked attempts
- It has no read-only mode
- Check the vendor page for supported Windows versions before buying
- It does not encrypt the files on a drive
For a documented write-protected mode on a drive, Folder Protect is the closer NewSoftwares tool; it lists a write-protected setting for files and drives on Windows 10, 8 and 7.

Features
USB Block Features From the Official Product Page
USB Block organises its controls into Control Center switches, an Authorized Devices list, Reports and Logs, and Program Options for stealth mode, a password and attempt monitoring. Read-only mode is not among the documented features, which is why it suits blocking jobs and not write protection.
The list below comes from the product’s own screens and documentation, not from our testing. USB Block runs on Windows and is organised in tabs.
- Control Center
- Switches for USB drives and memory cards, discs and floppies, network access and non-system drives.
- Authorized Devices
- A list of approved devices that keep working while others are blocked.
- Reports and Logs
- Device and usage reports that keep the last hundred log entries.
- Program Options
- Stealth mode with a hotkey, a program password, protection in Safe Mode and monitoring of failed password or uninstall attempts.
- Known-drive allow-lists
- Shared and front-desk PCs
- Read-only access
- Encrypting a drive’s contents


Cost
USB Block Pricing: What to Check Before You Buy
Check the store listing for the current price and licence terms, because this guide does not quote one. Then ask whether you need an allow-list, a password and a log; if you only need read-only access, the free built-in methods are enough.
This guide does not quote a price, because prices on the NewSoftwares store change and a stale figure would mislead you. The product can be downloaded from the official page, and the store lists the full version. Ask yourself one question first: does your job need an allow-list or a password in front of the settings? If not, the free methods above are enough and the purchase is not worth it.
Adjacent topic
USB Protect
USB protection splits into four separate jobs: stopping changes, stopping reading, stopping unknown devices and slowing copying. No single setting does all four, so decide which worry you have first and pick the control that targets it.
People who search for USB Protect usually mean one of three jobs: stop a drive being changed, stop it being read by strangers, or stop devices connecting at all. The three scopes map neatly onto them.
| Worry | Control | Where to read more |
|---|---|---|
| Someone overwrites my files | Write protection (read-only) | Methods above |
| Someone reads a lost drive | Password or encryption | Password section |
| Unknown drives plug into my PC | Blocking or an allow-list | Allow-list section |
| Someone copies files out | Copy restriction (deters casual copying) | Related tools |
Each control is separate. A stick can be write-protected and unencrypted, or encrypted and writable.
Adjacent topic
USB Password Protection Software
USB password protection software controls who can open the files on a drive, which is a separate question from who can change them. Choose it for loss or theft, choose write protection for infection or overwrites, and combine both when a drive travels and is shared.
Password protection and write protection answer different questions. A password stops people opening files; write protection stops them changing files. If a stick could be lost, a password or encryption is the control that matters, and there are file-level, partition-level and whole-drive ways to approach it.
Within the NewSoftwares range, USB Secure’s password lock for removable drives installs on the stick so the protection travels with it. Treat any password feature as a deterrent for honest finders and not as proof against a determined attacker; if the drive holds sensitive data, use full-disk encryption as well.

Adjacent topic
Free Password Protect USB Flash Drive
To password protect a USB flash drive for free, use BitLocker To Go on Windows Pro and above, or a free third-party vault on Home. Both lock the contents behind a password; neither stops a writable drive from being changed once someone has opened it.
Free options exist for passwords on a flash drive, and the main built-in one is BitLocker To Go on Windows Pro and above, which encrypts a drive behind a password and a recovery key. For Home editions, a free third-party vault is the usual substitute; one reviewer’s roundup of five tools for locking USB sticks shows the range, though the article dates from 2015, so check any tool’s current status before you rely on it.
Whatever you choose, keep a recovery path. A forgotten password with no recovery key is final, and the legitimate fix is to find the key or backup you stored when you set it up.
Adjacent topic
USB Protection Software
USB protection software falls into four types: port blockers, password vaults, write protectors and antivirus. Each stops one kind of problem and leaves the others open, so a single product rarely covers every worry and most setups combine two.
The word covers four product types, and they are rarely interchangeable. The table sorts them by what they stop.
| Type | Stops | Does not stop |
|---|---|---|
| Port blocker or device control | Unknown drives connecting | Reading from approved drives |
| Password or encryption vault | Strangers opening files | Changes by someone who has the password |
| Write protector | Changes to files and new files | Reading and copying |
| Antivirus | Known malware on the drive | A user copying data out |
One tool rarely covers more than two rows, so list your worries before you pick.
Decide
Who Should Use Which Option
Match the method to the situation, not the other way round: a home PC wants a registry value, a managed office wants Group Policy, a backup stick wants a hardware slider and a PC that must accept only two named drives wants an allow-list.
| Situation | Best method | Fits USB Block? | Honest alternative |
|---|---|---|---|
| One home PC, I want drives read-only | Registry WriteProtect | No, it has no read-only mode | PowerShell for one disk |
| Office of Pro PCs, managed centrally | Group Policy deny write | Only if you need an allow-list | Intune or domain policy |
| A backup stick that must never change | Hardware slider | No | Set-Disk on the stick |
| Only two named drives should work | Allow-list | Yes | Device Installation Restrictions |
| A drive that could be lost | Encryption or password | No | BitLocker To Go |
| Shared PC in a lab or school room | Allow-list or storage block | Yes | USBSTOR Start=4 |
FAQ
Questions about write-protecting USB drives
Sixteen answers cover the registry, Group Policy, hardware switches, phones, Windows Home, shared PCs and rollback. Filter by topic to find yours quickly; each answer is short, and the longer walkthroughs sit in the sections above for anyone who wants the full steps.
How to enable write protection on a usb drive?
Set the WriteProtect DWORD to 1 under HKLM\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies, or enable the Group Policy setting Removable Disks: Deny write access on Windows Pro and above. Reconnect the drive afterwards, then try saving a file to confirm Windows now refuses the write. A drive with a physical slider needs only the slider moved.
Can I enable write protection on a usb drive without paid software?
Yes. The registry value, the Group Policy setting, diskpart and the PowerShell Set-Disk cmdlet all ship with Windows and cost nothing. Paid or third-party tools add a front end, logging or password control, but the read-only state itself comes from Windows. Choose the free route when you need one machine or one disk locked and are comfortable editing settings as an administrator.
What is the fastest way to enable write protection on a usb drive?
For a stick that has a slider, moving it takes two seconds and works on every computer. For a stick without one, the quickest software route is the administrator PowerShell line Set-Disk -Number N -IsReadOnly $true, where N comes from Get-Disk. Check the disk number twice; pointing the command at the wrong disk is the usual slip.
What mistakes should I avoid when I enable write protection on a usb drive?
Choosing the wrong scope tops the list: a registry value protects only the PC you edited, so the same stick stays writable elsewhere. Selecting the wrong disk number in diskpart comes next, followed by skipping the reconnect and then assuming the lock failed. Also avoid treating read-only as secrecy, because anyone who can read the files can still copy them.
How do I check that it worked after I enable write protection on a usb drive?
Reconnect the drive, then try to create a new text file on it. A working lock produces the message that the disk is write protected, often with error 0x80070013. Confirm in PowerShell with Get-Disk and read the IsReadOnly column. Also open an existing file, change it and try to save, since some apps hide the refusal until the save step.
Can I block USB storage but keep my keyboard and mouse working?
Yes. Storage rules target mass-storage drivers and removable-disk classes, while keyboards and mice are human-interface devices that load a different driver. Setting USBSTOR to Start=4 or using the removable-storage deny policies leaves them alone. Test with a spare keyboard within reach before applying a block to a machine you are not sitting at.
Does blocking USB ports stop phone charging?
Not in the usual case. Charging draws power from the port, and storage policies only govern data access, so a phone keeps charging while file transfer is refused. Phones appear as portable devices rather than disks, which is why the separate WPD Devices: Deny write access policy exists. A hardware-level port disable in firmware is a different control and can stop charging.
Will USB blocking work on Windows Home?
The registry methods work on Windows Home, including WriteProtect and the USBSTOR start value. The Local Group Policy Editor is the part Home lacks, so the policy route needs Pro, Enterprise or Education, or the equivalent registry keys written by hand. Third-party blocking software also runs on Home because it does not depend on Group Policy.
How do I re-enable USB ports as the administrator?
Reverse the exact change you made. Set WriteProtect to 0 or delete it, set USBSTOR Start back to 3, and switch the Group Policy items to Not Configured. Run gpupdate /force, reconnect the drive and test with a harmless file. Keep a second admin account or a restore point ready before you begin.
Can I allow only one approved USB drive?
Windows Group Policy can allow devices by hardware ID or device-class GUID under Device Installation Restrictions, which is how an allow-list is built natively. It takes careful testing. Dedicated blocking software keeps an authorized-devices list you add to with a few clicks, and that is the simpler route for one approved stick on a few PCs.
Is write protection the same as password protection?
No. Write protection stops changes and new files while leaving the contents readable. Password protection or encryption controls who can open the files at all. A drive can be one, the other or both. If the worry is theft or loss, you want encryption; if the worry is infection or accidental overwrite, you want write protection.
Why does my USB drive say the disk is write protected when I did not set anything?
A hardware slider, a leftover registry or policy value, a disk marked read-only through diskpart, or a worn flash drive that locked itself into read-only mode can each cause it. Work from the cheapest check to the costliest, and see the dedicated walkthrough in the fix guide.
Does write protection stop malware from spreading through a USB drive?
It stops malware from writing itself onto a protected drive and from changing files already there, which closes one common spreading path. It does not scan files, and it does not stop an infected PC from reading a bad file off the drive and running it. Keep antivirus active alongside the lock.
Can I turn write protection on for one USB drive but not another?
Yes, when the scope is the disk or the stick. diskpart and Set-Disk target one disk number, and hardware switches live on one device. The registry value and the Group Policy removable-disk setting apply to every USB storage device on that PC, so they cannot single out one drive.
Do I need to restart Windows after changing the registry value?
Usually a reconnect is enough, because the value is read when the drive is mounted. If a drive was already attached when you edited it, unplug it and plug it back in. When behaviour still looks unchanged, a restart rules out a stale driver state, and it costs one minute.
Can write protection be undone by someone else on a shared PC?
Any account with administrator rights can reverse the registry or policy settings, which is why the lock only works well with a standard-user daily account. Software blockers add a password on top of that. Treat these controls as policy for honest users, not a defence against a determined administrator.
Verdict
The Bottom Line
The best write protection is the one whose scope matches your worry: a slider for a single stick anywhere, a registry value or Group Policy for a PC, PowerShell for one disk, and a blocker only when you need an approved-drive list.
Use a hardware slider when the drive has one, the registry value or PowerShell when it does not, and Group Policy when you manage many Pro PCs. Choose blocking software only when the real need is an approved-drive list, and add a password or encryption when the drive might be lost.
Go deeper
The NewSoftwares.net team writes this guide and covers free and built-in methods next to our own. Questions about the product? Contact the developer. Last verified November 2026.


