Scanning for viruses with Windows Defender by command line


  1. Posts : 69
    Windows 10 Pro x64
       #1

    Scanning for viruses with Windows Defender by command line


    Hi!

    I know that Windows Defender allows to scan for viruses by command line.
    I'm using it not for simple problem - after scan (?) it closes console and I see result not.
    I'm using this command:

    "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "%1"

    How to leave console opened with visible result?

    Thank you for help.
    Miro
      My Computer


  2. Posts : 822
    Microsoft Windows 10 Pro 64-bit
       #2

    Open the command prompt and paste the command in it should stay open, If you start it with the run command it will close.

    To paste the command into the terminal:

    Open the command prompt with admin rights

    copy the command to the clipboard

    Paste the command with the right click of the mouse

    EDIT:
    Your command does not work

    Code:
    C:\WINDOWS\system32>"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "%1"
    CmdTool: Failed with hr = 0x80070002. Check C:\Users\Owner\AppData\Local\Temp\MpCmdRun.log for more information
    Note:
    If you press the left mouse key in the terminal you will erase the clipboard contents.
      My Computer


  3. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #3

    So, this way it works not? I'm admin and owner of Program Files and Program Files (x86) folders - for problems I changed ownership.

    But you're talking about using it manually.

    I'm using it in menu of XYplorer and context menu (context menu of XYplorer allows to use only 32-bit menu and there is not included WD scan).
    XYplorer is perfect File Explorer replacement but new version has problem with 64-bit contexxt menu...

    Miro
      My Computer


  4. Posts : 822
    Microsoft Windows 10 Pro 64-bit
       #4

    Try this tutorial written by Brink from TenForums and see if it helps.

    How to Scan with Windows Defender in Windows 10 Windows 10 Tutorials
      My Computer


  5. Posts : 69
    Windows 10 Pro x64
    Thread Starter
       #5

    Thank you, so I do update and will see.

    Miro
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:29.
Find Us




Windows 10 Forums