Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How can i scan my computer for viruses using cmd.exe?  (Read 20062 times)

0 Members and 1 Guest are viewing this topic.

evp.tooLock

  • Guest
How can i scan my computer for viruses using cmd.exe?
« on: May 26, 2010, 06:59:36 AM »
thanks

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: How can i scan my computer for viruses using cmd.exe?
« Reply #1 on: May 26, 2010, 03:44:05 PM »
What anti-virus software do you run normally? Some come with command-line scanners.
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

macdad-



    Expert

    Thanked: 40
    Re: How can i scan my computer for viruses using cmd.exe?
    « Reply #2 on: May 27, 2010, 07:50:47 AM »
    For example(again depending upon whatever Anti-virus your using you can modify the code to run at startup, different intervals, etc.)

    AVG Once-A-Month Interval Scan at startup:

    Code: [Select]
    @echo off
    cd "C:\Program Files\AVG\AVG9"
    set curday=%DATE:~7,2%
    set curmonth=%DATE:~4,2%
    set curyear=%DATE:~10,4%
    set scanfilelog=%curmonth%%curyear%
    If not exist %scanfilelog%.log (
     echo Scanned > %scanfilelog%.log
     start /wait "avgscanx /COMP /HEUR /ARC /TRASH /QT /BOOT /PROC /REG /COO /ADS /SHUTDOWN"
    ) else (
     echo Continue with startup
     exit
    )
       

    Note: This is just an example.

    If you have a different AntiVirus just check the Help guide, It should tell you about the CMD params.
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    marvinengland



      Hopeful

      Thanked: 11
      Re: How can i scan my computer for viruses using cmd.exe?
      « Reply #3 on: May 30, 2010, 08:41:01 AM »
      thanks


      C:\Program Files\Malwarebytes' Anti-Malware>dir mb*.*
       Volume in drive C has no label.
       Volume Serial Number is 304E-C1B1

       Directory of C:\Program Files\Malwarebytes' Anti-Malware

      01/07/2010  03:57 PM            59,241 mbam.chm
      01/07/2010  05:07 PM           167,760 mbam.dll
      01/07/2010  05:07 PM         1,394,000 mbam.exe
      01/07/2010  05:07 PM            84,816 mbamext.dll
      01/07/2010  05:07 PM           429,392 mbamgui.exe
      01/07/2010  05:07 PM           236,368 mbamservice.exe
                     6 File(s)      2,371,577 bytes
                     0 Dir(s)   6,751,793,152 bytes free

      C:\Program Files\Malwarebytes' Anti-Malware>mbam.exe

      C:\Program Files\Malwarebytes' Anti-Malware>
      USA

      Carbon Dudeoxide

      • Global Moderator

      • Mastermind
      • Thanked: 169
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Experience: Guru
      • OS: Mac OS
      Re: How can i scan my computer for viruses using cmd.exe?
      « Reply #4 on: May 30, 2010, 09:21:03 AM »
      Hmmmm....Why'd you DIR your MBAM folder?

      marvinengland



        Hopeful

        Thanked: 11
        Re: How can i scan my computer for viruses using cmd.exe?
        « Reply #5 on: May 30, 2010, 10:28:50 AM »
        Hmmmm....Why'd you DIR your MBAM folder?

        To clarify the procedure for people new to CMD.

        How would Carbon suggest showing how to run mbam.exe  from the command prompt? 
        USA

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: How can i scan my computer for viruses using cmd.exe?
        « Reply #6 on: May 30, 2010, 03:11:38 PM »

        Updates mbam, runs a quickscan, and only shows the results if something is found.
        Code: [Select]
        %programfiles%\Malwarebytes' Anti-Malware /runupdate /quickscanterminate /fullauto
        I was trying to dereference Null Pointers before it was cool.

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: How can i scan my computer for viruses using cmd.exe?
        « Reply #7 on: May 30, 2010, 06:54:18 PM »
        Updates mbam, runs a quickscan, and only shows the results if something is found.
        Code: [Select]
        %programfiles%\Malwarebytes' Anti-Malware /runupdate /quickscanterminate /fullauto
        Wouldn't you need to enclose the path with quotes?
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        Carbon Dudeoxide

        • Global Moderator

        • Mastermind
        • Thanked: 169
          • Yes
          • Yes
          • Yes
        • Certifications: List
        • Experience: Guru
        • OS: Mac OS
        Re: How can i scan my computer for viruses using cmd.exe?
        « Reply #8 on: May 30, 2010, 07:22:07 PM »
        To clarify the procedure for people new to CMD.

        How would Carbon suggest showing how to run mbam.exe  from the command prompt? 

        Buffalo Bill

        macdad-



          Expert

          Thanked: 40
          Re: How can i scan my computer for viruses using cmd.exe?
          « Reply #9 on: May 30, 2010, 08:01:34 PM »
          Wouldn't you need to enclose the path with quotes?

          It would be a good measure on older OS's, but It's usually not required.
          If you dont know DOS, you dont know Windows...

          Thats why Bill Gates created the Windows NT Family.

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: How can i scan my computer for viruses using cmd.exe?
          « Reply #10 on: May 30, 2010, 08:19:32 PM »
          Wouldn't you need to enclose the path with quotes?
          crap, and include the exe name

          Code: [Select]
          "%programfiles%\Malwarebytes' Anti-Malware\mbam.exe" /runupdate /quickscanterminate /fullauto
          I was trying to dereference Null Pointers before it was cool.