Add Scan with Windows Defender to Explorer right click context menu in Windows 8.1

Windows 8.1 comes with a built-in antivirus protection software called Windows Defender. It provides basic protection and according to Microsoft, it is good enough for many users. If you need to check some file or folder, for example, files on a removable drive, you should launch the Windows Defender app using the Control Panel and customize the scan options. This is not handy and takes too many clicks. In this article we will see how to add it directly to the File Explorer right click context menu, so you will be able to scan for files with just a right click.

Advertisment

  1. Open Notepad. You can run it by pressing Win + R hotkeys and typing notepad in the 'Run' box.
    Run Notepad
  2. Copy and paste the following text:
    Windows Registry Editor Version 5.00
    ; Folder Scan
    
    [HKEY_CLASSES_ROOT\Folder\shell\WindowsDefender]
    "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll"
    "MUIVerb"="Scan with Windows Defender"
    
    [HKEY_CLASSES_ROOT\Folder\shell\WindowsDefender\Command]
    @="cmd.exe /s /c \"\"C:\\Program Files\\Windows Defender\\MpCmdRun.exe\" -scan -scantype 3 -SignatureUpdate -file \"%1 \"\" & pause"
    
    ; File Scan
    
    [HKEY_CLASSES_ROOT\*\shell\WindowsDefender]
    "Icon"="%ProgramFiles%\\\\Windows Defender\\\\EppManifest.dll"
    "MUIVerb"="Scan with Windows Defender"
    
    [HKEY_CLASSES_ROOT\*\shell\WindowsDefender\Command]
    @="cmd.exe /s /c \"\"C:\\Program Files\\Windows Defender\\MpCmdRun.exe\" -scan -scantype 3 -SignatureUpdate -file \"%1 \"\" & pause"
  3. Save the text above to the file "Add_Scan_with_Windows_Defender_Context_Menu.reg". Type or copy this name with quotes as shown below:
    Save as reg file
    You can save it to any location you want, i.e. Desktop.
  4. Double click the .REG file you just created, click Yes to merge the file and you are done!
    Context Menu

As a bonus, I have prepared the two reg files for your convenience. The first is to add the menu item mentioned in this article, and the second one is Remove_Scan_with_Windows_Defender_Context_Menu.reg, which can be used to remove the context menu item and restore the defaults.

Download ready-to-use registry files to add Windows Defender to context menu

Advertisment

10 thoughts on “Add Scan with Windows Defender to Explorer right click context menu in Windows 8.1

  1. Anon

    How about making it work like the equivalent context menu entry from MSE on Windows XP, Vista, and 7?

    Reply
  2. Lightning

    Thanks for tip…
    Sergey, can this be done as GUI version or not?

    Reply
    1. Sergey Tkachenko Post author

      At this moment, I found only this cli way.

      Reply
      1. Lightning

        Sergey, what about to export from registry content menu of Security Essentials or System Center Endpoint Protection and only change path to Windows Defender?

        Reply
        1. Sergey Tkachenko Post author

          Nice idea. I will try

          Reply
  3. Bryan

    Thanks Sergey, this tweak worked well. Do you have any examples of how to do this for a particular file type? For instance, I want to add a “Minify” command for JavaScript files that points to a minification script I have.

    Reply
    1. Sergey Tkachenko Post author

      I will write an article soon :)

      Reply
  4. Edwin A. Hernández-Caraballo

    Hi. You don´t mention in your article that the modification implemented will open a windows with the command prompt, and that the scan will be made “outside” the Windows environment. Why does this work in such a way? Why not opening the Windows Defender window as it is normally done? Thanks.

    Reply
  5. dezdez

    That worked a treat, thanks!

    Reply
    1. Sergey Tkachenko Post author

      you are welcome

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *