Steps To Remove Computer Viruses Using Command Prompt:
Step 1. Click on Start and type cmd. Now right click on the cmd icon and select run as administrator. Running the command as administrator is important as you need to access the system files which are not usually visible in guest accounts. Now command prompt window will open, now select your drive from which you want to remove a virus.
Step 2. Let us suppose your USB has a virus and your USB drive is F. Type "F:" without quotation on Command line.
Now the C: will change to F: Now you need to type "dir F:" in CMD and hit enter. It will show you the directory of F drive.
So now type the following command to show all the hidden and system files on your USB drive. Type "dir F: attrib -s -h /s /d*.*
" without quotations and press enter. Typing this command will explore your selected drive and will load all the files including hidden and system files on your drive.
In this window you will notice unusual file.exe and extention if your computer has been infected with a virus like the dreaded autorun.inf
virus. Rename it using this command line rename filename.extension new filename. Usage > C://rename autorun.inf (new filename)
That's it! Now you can identify all the viruses in your PC and USB and delete them without any help of anti-virus software. You can delete the autorun.inf by typing in the command "del autorun.inf
" or del :"yourfilename"