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.
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.
1) Open CMD (Command Prompt) on your windows computer and run it as an administrator (Right Click on CMD and then Run as Administrator)
2) Now type the name of the drive, for example, you need to scan drive D: then type D: and press enter.
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
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
-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.
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.