How to Remove a Virus Using Command Prompt
Virus is a computer program that can copy itself and infect your computer. These viruses can spread via USB/flash drive or from one computer to other computer by few written codes. There are many antivirus software available to remove viruses from computer. But there are some viruses or suspicious files which can’t be removed by any antivirus software. Some suspicious files such as autorun.inf initiate all the viruses in pc. These files must be removed for safe operation of your pc, because they may lead to data loss, software damages etc. Such viruses and files can be removed by using cmd. In this article we will discuss how to remove a virus using command prompt. Following steps can be used to remove a virus using command prompt from your computer.
- Go to start menu and type “cmd” in the search box or Start>all programs>accessories>command prompt.
- Open the infected drive such as write , g: to go to G drive.
- Now type dir/w/a . It will show all the files of the drive including hidden files.
- Locate AUTORUN.INF or any Virus and other suspicious files in the directory.
- Type command attrib -r –a –s –h to remove attributes of corresponding file.
Type del autorun.inf to delete autorun.inf file.
- Now type del virus name.exe t delete it, eg : del newfolder.exe .
- When you find an Autorun.inf file or any other unusual .exe file just rename it.
- Now you can access the defected drive without affecting the virus.
- To delete the renamed file go to the defected drive and select the file you renamed.
- Type cd recycler command.
- Again type dir/w/a to locate all file of the folder.
- Identify malicious files and delete them using above commands.