Prevent the hard drive from being formatted by the virus? Two ways to easily get

  
more and more virus programs to destroy computer data, some viruses directly format the hard disk partition. Today we will learn the following two methods to prevent the virus program from destroying the hard disk format.
Method 1: Lock DOS command method
The basic principle of this method is to limit dangerous DOS commands to prevent illegal use of these commands to destroy hard drive data. The specific method is as follows:
Use “Notepad” Open the Autoexec file in the root directory of the C drive and add the following statement to it:
C:\\>DOSKEY FORMAT=Bad command or filename!
C:\\>DOSKEY del=Bad command or filename!
C:\\>DOSKEY deltree=Bad command or filename!
Then save and exit. When you call the FORMAT, DEL, DELTREE, etc. commands, the Bad command or filename will be displayed and the operation will be rejected. If you need to format the hard disk in a special case, what should you do? You can enter the command: C:\\>DOSKEY FORMAT= (Enter), so you can freely operate the hard disk. .
Method 2: Move external command method
Prevent hacker programs or malicious code from illegally formatting and modifying hard disk data. You can rename or move related DOS commands to other directories. You can then format the hard disk later. Change the name back, the specific method is: find the C:\\Windows\\format.exe file, change its file name to format.txt or move to another directory. If you don't see the file extension in “My Computer” Name, you can choose “ Tools & Rarr; Folder Options & Rarr; View & rdquo;, remove the hook before the "hidden file name extension". In addition, you can use the Windows optimization master to lock the format command, but the basic principle is to rename the format command.
The above method is simple, but sometimes it can only prevent the gentleman from being able to prevent the villain. If someone else is booting from a CD or floppy disk, the same way to format the hard drive. Therefore, using the above method also needs to cooperate with the BIOS settings, set the boot order of the computer to boot only from the hard disk, and add a password to the BIOS, so that it can be foolproof.
When you encounter a hard disk that is maliciously formatted, which method do you choose? It depends on your own choices, and the small series is not too strong.

Copyright © Windows knowledge All Rights Reserved