Use appropriate permissions and checks to avoid formatting partitions.
Use appropriate permissions and checks to avoid formatting partitions.
To stop a partition from getting formatted, use disk management tools or system settings. To hide a specific partition in This PC/Explorer, adjust its visibility settings in the file explorer options.
Do not assign a letter to the disk in Disk Management; it won’t appear on your computer, though it won’t stop formatting if someone is persistent. Nothing will happen. Removing the letter will block access until you re-assign it.
You can edit Disk Management and delete the partition's drive letter. However, if the drive is used by other applications (like pointing a program such as Download in Chrome to it), they won't recognize it anymore.
It still allows me to launch GParted and prepare the filesystem.
The partition is a VeraCrypt encrypted container. When you click on it, it prompts you to format it, which worries me in case I accidentally change the settings.