How To Remove Computer Virus Using Cmd (No Software Required)

November 08, 2017 | | TAG: Security | No comments:
remove virus from computer
remove virus from computer without using any software

You might have been using antivirus software to remove viruses and malware from your computer. Some Antivirus software might be so expensive and some might not. These Antivirus software help in removing viruses and also help to prevent your computer from getting infected by viruses, but not completely.

If you don't want to waste your money on Antivirus software and you wish to remove the virus from your computer without paying a penny, then this article might be very useful to you.

These viruses and malware are big burdens to our computer. They majorly affect our computer's functionality and process and also may result in data loss.

Our computers get infected by viruses in mainly three ways: 1. from removable media, 2. Intenet Downloads, 3. Through E-mail attachments.

Is it possible to remove the virus from our computer without using an Antivirus software? Yes, it is possible. We should be thankful for CMD(command prompt) because by using this we can remove the virus without using any software. All most every version of windows had CMD installed by default so I think this process work in all windows versions.

Let's See:

How To Remove Computer Virus Using Cmd

This is a very very easy trick. I think you might have seen files like autorun.inf, newfolder.exe, randomname.ext, etc. These are not the usual files but viruses. Follow the below steps to remove viruses/malware from your computer.

1. Open you Cmd(command prompt) on your Windows computer and run it as an Administrator(Right click on it to run as an Administrator).


2. You should now select a drive in which you wanna remove the virus. If you wanna scan the drive with P: attribution then type P: in cmd and hit enter so that P: drive will be selected.


3. Run this command: attrib in cmd. It lists all of your files on the current drive. Below you can see a file with name autorun.inf, this is a virus that caught when cmd scanned your P: drive.


4.Type this command: attrib -r -a -s -h *.* and hit enter. This command helps you to remove Read-only, Archived, System and hidden files from all your files that present in P: drive.

-r :: will remove Read-only files,
-h :: will remove Archived files,
-s :: will remove System files,
-h :: will remove Hidden files,
*.* :: It is for applying the above rules for all files with different types of extensions.


5. As we have removed attributions with the above command now it's time to remove the virus file autorun.inf. For that run this command: del autorun.inf and press enter. This command will delete the autorun.inf file permanently from your computer.

If you have found any other virus file like newfolder.exe then replace autorun.inf with newfolder.exe in above step.


In this way, you can remove viruses and malware from your computer. If any suspicious file or unwanted file is found in your computer then remove it as soon as possible by following the procedure. Check all the drives and remove the unwanted/suspicious files. Hope you enjoyed the article.

Don't forget to share this article on social media...

Post a Comment

Don't Miss An Update