Method One: Move the external command method
Prevent hacker programs or malicious code illegal format, modify the hard disk data can be renamed or moved to the other directory, the next time you want to format the hard disk file name can be changed back, Find the C:windowsformat.exe file, change its file name to Format.txt or move to another directory, and if you don't see the file extension in My Computer, you can choose tools → folder options → view to hide the extensions for known file types "Before the hook is removed. In addition, you can use Windows Optimizer master to lock the format command, but the rationale is to save the format command by renaming it.
Although the above method is simple, but sometimes can only prevent a gentleman can not prevent the villain. If someone else is a system booted from a CD or floppy disk, it also formats the hard drive. So use the above methods also need to match the BIOS settings, the computer's boot sequence is set to boot only from the hard drive, and the BIOS password, so that can be foolproof.
Method Two: Lock DOS command method
The rationale for this approach is to limit the risk of DOS commands to prevent unauthorized use of these commands to destroy hard disk data. The specific methods are as follows:
Use Notepad to open the AutoExec file in the C-packing directory and add the following statement:
C:>doskey Format=bad command or filename!
C:>doskey Del=bad command or filename!
C:>doskey Deltree=bad command or filename!
Then save the disk and exit. When you invoke the commands such as format, DEL, deltree, and so on, you will see bad command or filename and reject the operation. If you need to format your hard disk in a particular situation, what do you do? You can enter the command: C:>doskey format= (enter), so you are free to operate the hard drive.