How To Remove Virus From Computer Using CMD

How To Remove Virus From Computer Using CMD

How To Remove Virus From Computer Using CMD

How To Remove Virus From Computer Using CMD:  CMD is very useful, and it can even help you get rid of computer viruses. here’s how to remove computer virus using Command prompt

The word ‘virus’ always sounds painful, a virus is something that infects your computer. Virus can enter your computer from various sources like USB/Flash drives, external media and through the internet. There are many software available on the internet which claims to protect your computer against major virus attacks.

Related: 5 Best Antivirus And Mobile Security Apps For Your Android 2017

What if I tell you that you can actually remove computer virus without installing any antivirus solution? This is possible, thanks to the command prompt. CMD is very useful, and it can even help you get rid of computer viruses. Most of us grapple with the virus like autorun.inf, newfolder.exe, randomname.ext, etc.

How To Remove Virus From Computer Using CMD

Viruses can hide itself from you and it can be found inside files, programs and almost anything that you download from the internet. Therefore, here is an easy trick that will help you to remove computer virus using Command prompt.

Related: Top 5 Free Best Anti-Virus Of 2017 For Your Windows PC

1) Open CMD (Command Prompt) on your windows computer and run it as an administrator (Right Click on CMD and then Run as Administrator)

CMD (Command Prompt)

CMD (Command Prompt)

2) Now type the name of the drive, for example, you need to scan drive D: then type D: and press enter.

CMD (Command Prompt)

CMD (Command Prompt)

3) Users need to type ‘attrib‘ and then hit enter. This will list all the files inside the current drive, in the below image you can see the autorun.inf virus listed

CMD (Command Prompt)

CMD (Command Prompt)

4) Here users need to type in the following command ‘attrib -r -a -s -h *.*‘ and then press Enter. This command basically removes the Read Only, Archive, System and hidden file attribute from all the files

CMD (Command Prompt)

CMD (Command Prompt)

-r is for removing the read-only files
-a is for removing the archive file
-s is for removing the system file
-h is for removing the hidden file
*.* for all the files with all different types of file extensions

5) After removing the attributes, it’s time to remove the file. Now type in del autorun.inf and then hit Enter.

CMD (Command Prompt)

CMD (Command Prompt)

Related: How To Protect Your Files And Computer From Viruses and Malware

This is how you can remove the virus using a command prompt if you want to remove a virus from USB drive, then just follow the same procedure, but make sure to change the name of a drive as mentioned in number 2 step. Hope you like the article, share with others also.

Rate this post

4 Comments

  1. Eric July 24, 2017
  2. geleta July 24, 2017
  3. alexandru August 1, 2017
  4. John reb September 2, 2017

Add Comment