Recently, several users have contacted me with the same type of problem – when copying information to a USB flash drive, an error occurred, something like the following: ' The disk is write-protected. Remove protection or use a different disc '.
This can happen for various reasons and there is no one-type solution. In this article I will give the main reasons for this error and their solution. In most cases, the recommendations from the article will return your drive to normal operation. Let's get started …
1) Enabled mechanical write protection on a USB flash drive
The most common reason for a security error is the switch on the USB flash drive itself (Lock). Previously, something like this was on floppy disks: wrote something you wanted, put it in read-only mode – and you don't worry about forgetting and accidentally erasing the data. Such switches are usually found on microSD flash drives.
In fig. 1 shows such a flash drive, if the switch is set to Lock mode, then it will only be possible to copy files from the flash drive, nor write, not format it!
Figure: 1. MicroSD with write protection.
By the way, sometimes you can also find such a switch on some USB sticks (see Fig. 2). It is worth noting that it is extremely rare and only in little-known Chinese firms.
Fig. 2. RiData flash drive with write protection.
2) Disable recording in OS settings Windows
In general, by default Windows there are no prohibitions on copying and writing information to flash drives. But in the case of viral activity (and indeed, any malware), or, for example, when using and installing various assemblies from various authors, it is possible that some settings in the registry have been changed.
Therefore, the advice is simple:
- first check your PC (laptop) for viruses (https://pcpro100.info/kak-pochistit-noutbuk-ot-virusov/);
- then check the registry settings and local access policies (more on this later in the article).
1. Checking registry settings
How to enter the registry:
- press the WIN + R button combination;
- then in the Run window that appears, enter regedit;
- press Enter (see Figure 3.).
By the way, in Windows 7 you can open the registry editor through the START menu.
Figure: 3. Run regedit.
Next, in the left column, go to the tab: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ StorageDevicePolicies
Note. You will have a Control section, but the StorageDevicePolicies section may not exist … If it does not exist, you need to create it, to do this, simply right-click on the Control section and select the section in the drop-down menu, then name it StorageDevicePolicies. Working with partitions resembles the most common working with folders in Explorer (see Fig. 4).
Figure: 4. Registry – creation of the StorageDevicePolicies section.
Next, in the StorageDevicePolicies section, create a 32-bit DWORD parameter: just right-click on the StorageDevicePolicies section and select the appropriate item in the drop-down menu.
By the way, such a 32-bit DWORD parameter can already be created in this section (if you had one, of course).
Figure: 5. Registry – creating a DWORD 32 parameter (clickable).
Now open this parameter and set it to 0 (as in Figure 6). If you have already created the 32-bit DWORD parameter, change its value to 0. Then close the editor and restart the computer.
Figure: 6. Set the parameter
After restarting the computer, if the reason was in the registry, you can easily write the necessary files to the USB flash drive.
2. Local access policies
Also, in local access policies, the recording of information to connected drives (including flash-drives) can be limited. To open the local access policy editor – just press the Win + R buttons and enter gpedit.msc in the execute line, then the Enter key (see Fig. 7).
Figure: 7. Execute.
Then you need to open the following tabs one by one: Computer Configuration / Administrative Templates / System / Access to removable storage devices.
Then, on the right, notice the 'Removable Drives: Deny Writing' option. Open this setting and disable it (or switch it to Not Configured).
Figure: 8. Deny writing to removable drives …
Actually, after the specified parameters, restart your computer and try to write files to the USB flash drive.
3) Low-level formatting of a flash drive / disk
In some cases, for example, with some types of viruses, there is no choice but to format the drive in order to completely get rid of the malware. Low-level formatting will destroy absolutely ALL DATA on the flash drive (you will no longer be able to recover it with various utilities), and, at the same time, it helps to bring back to life the flash drive (or hard drive), on which many have already given up …
What utilities can be used.
In general, there are more than enough utilities for low-level formatting (besides, on the website of the manufacturer of the flash drive, you can also find 1-2 utilities for 'reanimating' the device). Nevertheless, empirically, I came to the conclusion that it is better to use one of the following 2 utilities:
- HP USB Disk Storage Format Tool. Simple, no installation required, utility for formatting USB-Flash drives (the following file systems are supported: NTFS, FAT, FAT32). Works with devices via USB 2.0 port. Developer: http://www.hp.com/
- HDD LLF Low Level Format Tool. An excellent utility with unique algorithms that allows you to easily and quickly format (including problem drives that other utilities and Windows) HDD and Flash cards cannot see. The free version has a speed limit of 50 MB / s (not critical for flash drives). I will show my example below in this utility. Official website: http://hddguru.com/software/HDD-LLF-Low-Level-Format-Tool/
An example of low-level formatting (in the HDD LLF Low Level Format Tool)
1. First, copy ALL the NECESSARY files from the USB flash drive to the hard disk of your computer (that is, make a backup copy. After formatting, you can't recover anything from this flash drive!).
2. Next, connect the USB flash drive and run the utility. In the first window select 'Continue for free' (i.e. continue working in the free version).
3. You should see a list of all connected drives and flash drives. Find yours in the list (be guided by the device model and its volume).
Figure: 9. Selecting a flash drive
4. Then open the LOW-LEVE FORMAT tab and click the Format This Device button. The program will ask you again and warn you about deleting everything that is on the USB flash drive – just answer in the affirmative.
Figure: 10. Start formatting
5. Then wait until formatting is done. The time will depend on the state of the media being formatted and the version of the program (paid works faster). When the operation is completed, the green progress bar will turn yellow. You can now close the utility and start high-level formatting.
Figure: 11. Formatting completed
6. The easiest way is to simply go to 'This computer' (or 'My computer'), select the connected USB flash drive in the list of devices and right-click on it: select the formatting function in the drop-down list. Then set the name of the flash drive and specify the file system (for example, NTFS, since it supports files larger than 4 GB. See Fig. 12).
Figure: 12. My computer / flash drive formatting
That's all. After such a procedure, your USB flash drive (in most cases, ~ 97%) will start working as expected (the exception is cases when the USB flash drive will not be helped by software …).
What is the cause of this error, what should I do to prevent it from happening again?
And finally, I will give several reasons why an error appears related to write protection (using the tips listed below will significantly increase the life of your flash drive).
- Firstly, always use safe disconnection when disconnecting a flash drive: right-click in the tray next to the clock on the icon of the connected flash drive and select disable from the menu. According to my personal observations, many users never do this. At the same time, such a shutdown can damage the file system (for example);
- Secondly, install an antivirus on the computer with which you are working with a USB flash drive. Of course, I understand that it is impossible to insert a USB flash drive into a PC with an antivirus everywhere and everywhere – but after coming from a friend where they copied files to it (from an educational institution, etc.), when you connect a flash drive to your PC, just check it ;
- Try not to drop or throw the flash drive. Many, for example, attach a USB flash drive to the keys, like a keychain. There is nothing wrong with that – but often the keys are thrown on the table (bedside table) upon arrival home (there will be nothing for the keys, but a flash drive flies and hits with them);
I bow to the sim, if there is something to add – I will be grateful. Happy work and fewer mistakes!