By configuring a write-protected disk, you can protect your data from accidental deletion or ransomware!

To configure a hard disk with a write protection – READONLY


Hard disks are still the first choice when it comes to backing up data. You create on it your Backup and then archive. So that one does not delete now accidentally the data, one could consider the Hard disk *is to be write-protected. Another important reason why you should configure your harddisk as a Read-only should mark is naturally also that one can protect itself against Ransomware. These are so-called encryption Trojans, which encrypt the hard disk and only release the decryption key by payment. So it is a blackmail.

Configure the write protection for a hard disk

The simplest way to set a disk as Read-only to mark is the command line tool diskpart. For this one opens first a command prompt with administrative rights. The easiest way to do this is via the start menu. In the next step you can list all hard disks.

To now select the appropriate Hard disk* to select, one still needs the Select command. In the following the data medium 2 is selected, to which the attribute for write protection should then be assigned.

Create a disk write protected with Diskpart Selecting the disk.

Now the hard disk must have the "Read-only" Attributes can be assigned. If you would like to see the help here, you can use the "help Command. Here you can also see which other attributes can be assigned to a hard disk. Also some examples are shown.

A Hard Disk With Diskpart Write Protected Create READONLY Attributes Set

A disk with Diskpart read-only Create READONLY Attributes Set

If you now try to save data to the write-protected disk or delete data from it, you will not be able to do so because of the write-protection.

Create a hard disk write-protected with Diskpart Save No longer possible

A hard drive with Diskpart read-only Create saving no longer Possible

Of course, the write protection can be removed again. As shown in the help above you need now at the attributes the option "Clear".


It can be quite advantageous not to leave hard disks always writable. When archiving Backing up hard drives* you might well consider write-protecting your data medium. By the way, it would also be conceivable to make the hard disk writable each time before the backup and then to immediately write-protect it again. You could call this. a. into a backupscript like in the article Simple Windows Backupscript to backup directories and files – Create a batch backupscript with Windows board tools Include described.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: