1. #1

    What should I do to detect and remove virus through command prompt in windows 7?

    I love using command prompt as it never hangs. I have heard that finding/detecting and removing virus using command prompt is so simple and it also doesn’t need any antivirus software to do so. I want to use the same so please provide some information about that command and full steps for the same.

  2. #2
    Aniruddha Array
    Join Date
    Jul 2012

    Re: What should I do to detect and remove virus through command prompt in windows 7?

    Dear friend,
    In your quest for a command prompt cleansing of virus let me tell you the procedure if it helps.

    Do take the following steps to remove virus and malware Files from your Drive without opening it:

    1. Antivirus that installed in your computer detects" autorun.inf" file.
    On opening this file,your system may get infected from virus and malwares.
    3. So, it has to be be removed using command prompt without going directly to the Drive.
    4. Open command prompt and go to the virus infected drive by typing “Drive name with colon” and press enter.
    Type attrib -s -h *.* /s /d and enter. Continue typing “dir” which will show all files/folders in that drive,
    As you can see that "autorun.inf" files is present in this drive.

    5. If you want to delete it just type “DEL autorun.inf” or you have the option of renaming it to delete it manually.
    To rename the file type in "command prompt"
    REN “Path of files/folder to be deleted” “New Name”
    Or if you are in the same drive using command prompt, then type REN “Name of files to be deleted” “New Name”

    6. You can check autorun.inf has been renamed as "New Name"

    7. Scan the drive then your antivirus won’t show virus in that drive.

    Try the method. Enjoy.

  3. #3
    windows-help Array
    Join Date
    Aug 2012

    Re: What should I do to detect and remove virus through command prompt in windows 7?


    If you want to find and delete virus from your computer using command prompt then you can follow the steps given below ... :

    - Firstly open command prompt by typing and entering CMD into the run box in the start menu ..
    - Now in the command prompt type the drive from which you want to delete the virus like C: and press enter
    - After that you have to type - s - h *. * /s /d into the command prompt and press enter
    - Typing and entering this will open up the virus attacked file ... You have to open that file..
    - Now you have to search for a file containing .exe format and file named autorun.inf
    - When found these files just make sure to write down the name of the program where the file is located...
    - Next you have to rename the autorun.inf file as virusfile and close the command prompt window
    - Now open my computer and open the drive and where the program that contains virus is loacted
    - When found open that program
    - After that right click on the file you just renamed as virusfile and delete it
    - Also right click on .exe file and delete it ..
    - At last restart your computer and you have now removed virus from your PC...


+ Reply to Thread

Similar Threads

  1. Replies: 54
    Last Post: 21-08-2013, 04:13 PM
  2. Replies: 14
    Last Post: 20-05-2013, 09:50 PM
  3. Replies: 9
    Last Post: 30-11-2012, 09:50 AM
  4. Command Prompt issues in HP desktop with windows OS
    By Unregistered in forum Windows Forum
    Replies: 2
    Last Post: 12-10-2012, 08:01 PM
  5. Replies: 10
    Last Post: 27-09-2012, 08:54 PM