Enable or Disable Disk Write Protection in Windows  

Page 1 of 6 123 ... LastLast
    Enable or Disable Disk Write Protection in Windows

    Enable or Disable Disk Write Protection in Windows

    How to Enable or Disable Write Protection for a Disk Drive in Windows
    Published by Category: Hardware & Drivers
    17 Feb 2020
    Designer Media Ltd


    How to Enable or Disable Write Protection for a Disk Drive in Windows


    Write protection (read-only) on a disk prevents the contents on the disk from being changed.

    There are many reasons for how a disk is write protected.

    This tutorial will show you different ways to enable or disable write protection for a hard drive, memory card, or USB drive for all users in Windows 7, Windows 8, and Windows 10.

    You must be signed in as an administrator to be able to do the options below.

    You will not be able to write protect the Windows drive.


    When a USB flash gives a This drive is write protected error and there is no physical switch to turn on/off write protection, the USB flash drive may have failed. The write protected error is an attempt to protect from data loss, so you can copy the contents from the USB flash drive to another storage location. In this situation, nothing can be done for the USB flash drive. It's dead.



    Contents

    • Option One: Enable or Disable Write Protection for USB Drive or Memory Card with Physical Switch
    • Option Two: Enable or Disable Write Access for All Removable Disks in Group Policy
    • Option Three: Enable or Disable Write Protection for Disk using Diskpart Command
    • Option Four: Enable or Disable Write Protection for USB Drives using a REG file
    • Option Five: Allow or Deny Write Access to Removable Drives not Protected by BitLocker in Group Policy
    • Option Six: Allow or Deny Write Access to Fixed Data Drives not Protected by BitLocker in Group Policy



    EXAMPLE: "The disk is write-protected." error message

    This is the usual error message a user will get when trying to format or write (ex: copy) something to a write-protected disk.

    Enable or Disable Disk Write Protection in Windows-this_disk_is_write-protected.jpg Enable or Disable Disk Write Protection in Windows-format_write-protected.jpg

    EXAMPLE: Error 0x8000FFFF: Catastrophic failure

    This is an error message a user will get when trying to create a new folder on a write protected disk in Windows 10.

    Enable or Disable Disk Write Protection in Windows-error_0x8000ffff_catastrophic_failure.png






    OPTION ONE

    Enable or Disable Write Protection for USB Drive or Memory Card with Physical Switch


    Some USB flash drives and memory cards have a physical switch that allows you to lock or unlock write-protection for it. The location of a switch (if available) on a USB flash drive will vary.

    If locked, this will override any other option below, and the device will be write protected on all PCs you connect it to until unlocked.


    1 Examine the USB flash drive or memory card for a switch like below. If available, you can move the switch to the locked or unlocked position to enable or disable write protection for the device.

    Enable or Disable Disk Write Protection in Windows-write-protection_memory_card.jpg

    Enable or Disable Disk Write Protection in Windows-usb_flash_drive_write-protect_switch.jpg






    OPTION TWO

    Enable or Disable Write Access for All Removable Disks in Group Policy


    This option is only applied when removable disks are connected to the PC that the policy is set on.







    OPTION THREE

    Enable or Disable Write Protection for Disk using Diskpart Command


    This option is only applied when removable disks are connected to the PC that the policy is set on.

    See also: My Disk is Read-only, Help! | Ask the Core Team


    1 Open an elevated command prompt.

    2 Type diskpart into the elevated command prompt, and press Enter. (see screenshots below)

    3 Type list disk into the elevated command prompt, and press Enter. Make note of the disk # (ex: disk 1) for the disk you want to enable or disable write protection for.

    4 Type the command below into the elevated command prompt, and press Enter.

    select disk #

    Substitute # in the command above with the actual disk # from step 3.

    For example: select disk 1


    5 Do step 6 (enable) or step 7 (disable) below for what you would like to do.


    6 To Enable Write Protection for the Disk

    A) Copy and paste the command below into the elevated command prompt, press Enter, and go to step 8 below.

    attributes disk set readonly

    Enable or Disable Disk Write Protection in Windows-set_removable_disk_read-only_command.jpg


    7 To Disable Write Protection for the Disk

    This is the default setting.

    A) Copy and paste the command below into the elevated command prompt, press Enter, and go to step 8 below.

    attributes disk clear readonly

    Enable or Disable Disk Write Protection in Windows-clear_removable_disk_read-only_command.jpg

    8 When successfully finished, you can close the elevated command prompt if you like.






    OPTION FOUR

    Enable or Disable Write Protection for USB Drives using a REG file


    The downloadable .reg files below will add and modify the DWORD value in the registry key below.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

    WriteProtect DWORD

    (delete) or 0 = Disable (default)
    1 = Enable


    1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.


    2 To Enable Write Protection for USB Drives

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Enable_Write_Protection_to_USB_drives.reg

    Download


    3 To Disable Write Protection for USB Drives

    This is the default setting.

    A) Click/tap on the Download button below to download the file below, and go to step 4 below.

    Disable_Write_Protection_to_USB_drives.reg

    Download


    4 Save the .reg file to your desktop.

    5 Double click/tap on the downloaded .reg file to merge it.

    6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

    7 Restart the computer to apply.

    8 You can now delete the downloaded .reg file if you like.






    OPTION FIVE

    Allow or Deny Write Access to Removable Drives not Protected by BitLocker in Group Policy







    OPTION SIX

    Allow or Deny Write Access to Fixed Data Drives not Protected by BitLocker in Group Policy



    That's it,
    Shawn



  1.    #1

    OK :)
      My Computer

  2. popeye's Avatar
    Posts : 132
    Windows 8.1 Pro 64-bit
       #2

    Very nice addition to the Tutorials David and Shawn!
      My Computer


  3. Posts : 13
    Windows 10
       #3

    I followed this procedure with my windows 10 installation usb. Disk part claimed success but I still cannot format it.

    To clarify I wish to format it so I can install the latest version of windows on the usb using the media creation tool, so I don't have to install so many updates if I ever have to reinstall windows again.

    If what I am attempting to do is simply not possible, by all means let me know.
      My Computer

  4. Brink's Avatar
    Posts : 48,692
    64-bit Windows 10 Pro for Workstations build 19631
    Thread Starter
       #4

    Hello Saracen, :)

    Are you getting any error messages when you try?

    Is this a USB from a retail box of Windows 10, or a USB that you have previously formatted to make a Windows 10 installation USB on? If so, then it may be permanently locked to prevent tampering with.

    If this is not a USB from a retail box of Windows 10, then you might see if running a "clean" command on the USB to make it unallocated to allow you to use afterwards.

    Disk - Clean and Clean All with Diskpart Command - Windows 7 Help Forums
      My Computers


  5. Posts : 13
    Windows 10
       #5

    It is indeed a retail box version, I've tried the clean function using diskpart and it gave me an error.

    No go on this one I guess.

    Thanks anyhow :)
    Last edited by Saracen Rush; 08 May 2016 at 12:41. Reason: To Update
      My Computer

  6. Brink's Avatar
    Posts : 48,692
    64-bit Windows 10 Pro for Workstations build 19631
    Thread Starter
       #6

    You could try to do a clean command on the USB, but I believe it's hardware locked to not be able to modify it.

    If you have another USB flash drive, you could use it. They're cheap these days.
      My Computers



  7. Posts : 1
    Windows 10
       #7

    does not work:

    Copyright (C) 1999-2013 Microsoft Corporation.
    On computer: XXXXXLP002


    DISKPART> list disk


    Disk ### Status Size Free Dyn Gpt
    -------- ------------- ------- ------- --- ---
    Disk 0 Online 931 GB 842 MB *
    Disk 1 Online 29 GB 0 B
    Disk 2 No Media 0 B 0 B
    Disk 3 Online 1862 GB 0 B


    DISKPART> select disk 1


    Disk 1 is now the selected disk.


    DISKPART> attributes disk
    Current Read-only State : Yes
    Read-only : No
    Boot Disk : No
    Pagefile Disk : No
    Hibernation File Disk : No
    Crashdump Disk : No
    Clustered Disk : No


    DISKPART> attributes disk clear readonly


    Disk attributes cleared successfully.


    DISKPART> attributes disk
    Current Read-only State : Yes
    Read-only : No
    Boot Disk : No
    Pagefile Disk : No
    Hibernation File Disk : No
    Crashdump Disk : No
    Clustered Disk : No


    DISKPART>
      My Computer

  8. Brink's Avatar
    Posts : 48,692
    64-bit Windows 10 Pro for Workstations build 19631
    Thread Starter
       #8

    Hello,

    Please provide more information about the disk along with a screenshot showing it in Disk Management. :)
      My Computers


  9. Posts : 1
    Windows 10 64bit
       #9

    "attributes disk clear readonly" this command worked for me, thanks a lot :)
      My Computer


 
Page 1 of 6 123 ... LastLast

Tutorial Categories

Enable or Disable Disk Write Protection in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 10:09.
Find Us




Windows 10 Forums