17 March 2014

Remove Virus Using Command Prompt

// // 6 comments


First Insert your Virus infected Pendrive and Scan for virus if detected then well and good otherwise go ahead to remove it from command prompt.
In this case(as per the below screenshot) it has detected the virus even though we would like to show you, how to remove this virus using command prompt?
Malware virus detected
As per the screenshot antivirus installed on this system has detected autorun.inf file.
This is the file; if you try to open it then your system may get fully infected by that virus.
So,now let it remove using command prompt without opening USB Drive.so for that you just need to follow the steps below.



  • First open command prompt and go to the virus infected drive by typing “Drive name with colon” (H: ) then enter.
  • Next type attrib -s -h *.* /s /d and enter. And continue by typing “dir” which will show you all files/folders in that drive, as you can see that autorun.inf files is present in this drive.
Autorun file


  • Now if you want to delete it then just type “DEL autorun.inf (i.e. name of file/folder to be deleted)” or rename it to delete it manually.
To rename the file just type in command prompt
REN “Path of files/folder to be deleted” (space) “Name to be given”
Or if you are in that drive using command prompt then type
REN “Name of files to be deleted” (space) “Name to be given”
Rename Autorun file


  • Now you can check that autorun.inf has been rename as useless
File Renamed as Useless


  • Now if you will scan USB Drive then your antivirus won’t show virus in that drive.
Novirus Detected


  •  Now if you wish then you can delete this file after opening the PenDrive/USB drive.
Delete useless file
You may not go for such a large procedure to delete any virus affected file if you have daily updated antivirus,but this is quite useful when one of your folder is giving you trouble by hanging your system when you open that folder.



 Must Read Control Android From PC
Please let us know through our comment box, if you're having any problem doing this or  have any quary regarding this tips.Subscribe to our rss feed to get daily updates right onto your mail inbox.Thanks for visiting.
Articles You May Like

6 comments: Leave Your Comments

  1. Very nice and helpful. I'll this procedure in Command Prompt. thanks

    ReplyDelete
  2. I need this. Every time i download a free software a lot of malware infecting my pc. Thanks a lot for this article.

    ReplyDelete
  3. Thanks for sharing this, will try this at home. Our pc is infected with malware and I don't know how to clean it. Our anti-virus seems not working.

    ReplyDelete
  4. I think it's much safer to remove virus in the command prompt.

    ReplyDelete
  5. Having a virus on the PC gives us too much headache. I'll try to do this on my sister's laptop because it is terribly infected with virus.

    ReplyDelete