SEARCH

How-To Geek

How to Add “Scan with Windows Defender” to the Context Menu in Windows 8

scan-with-windows-defender-from-context-menu

Windows Defender replaces Microsoft Security Essentials in Windows 8, but it does not include the ability to quickly right-click folders and scan them. However, you can add this option yourself with a quick registry hack.

This trick adds a “Scan with Windows Defender” option to the context menu that appears when you right-click a folder. It works similarly to the “Scan with Microsoft Security Essentials” option on previous versions of Windows.

Unfortunately, there is no command that launches Windows Defender in graphical mode and initiates a scan, so we will have to launch Windows Defender in a Command Prompt window.

Option 1: Download and Run a .reg File

You can add this option to your registry by downloading and running the file below. This will do everything for you – just download the .zip file, open it, and double-click the AddWindowsDefenderToContextMenu.reg file it contains.

Download WindowsDefenderContextMenu.zip

add-.reg-file-to-registry

If you want to remove this option later, run the included RemoveWindowsDefenderFromContextMenu.reg file.

If you would rather add this context menu option manually, follow the instructions below.

Option 2: Add the Context Menu Entry Manually

Press the Windows key to access the Start screen, type regedit at the Start screen, and press Enter to launch the Registry Editor.

launch-registry-editor-on-windows-8

Navigate to the following key:

HKEY_CLASSES_ROOT\Folder\shell

Right-click the shell key in the left pane, point to New, and create a new Key. Name it WindowsDefender.

create-windows-defender-key-in-registry

With the WindowsDefender key selected in the left pane, right-click in the right pane and create a new String value. Name it Icon, then double-click it and enter the following value:

%ProgramFiles%\\Windows Defender\\EppManifest.dll

Right-click in the right pane again and create another new String value. Name it MUIVerb, then double-click it and enter the following value:

Scan with Windows Defender

scan-with-windows-defender-in-registry

Right-click the WindowsDefender key in the left pane, point to new, and create a new key. Name it Command.

windows-defender-command-subkey

Double-click the (Default) value in the right pane with the Command key selected and give it the following value:

“C:\Program Files\Windows Defender\MpCmdRun.exe” -scan -scantype 3 -SignatureUpdate -file %1

windows-defender-scan-command

When you use the option, you will see the scan happen in a Command Prompt window. You will only be alerted if a problem is found. If the scan is very quick, you will see a Command Prompt window appear and disappear quickly. If a problem is found, the window will alert you instead of closing

windows-defender-scan-in-command-prompt

Adding Other Entries to Your Context Menu

You can use similar tricks to add any application to your Windows context menu.


If you want to scan individual folders from the graphical user interface, use the Custom option in Windows Defender to scan any file or folder.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 02/11/13

Comments (11)

  1. James

    Yet another issue that used to work fine in older versions, but is now crippled in Win8. Is there no end to the things that are downgraded in Win8? LOL

  2. jake

    Why such a VALUABLE tool would be removed is beyond me! I simply hit the Windows key, type defender, click on Windows defender and then select custom scan.
    Note to self: pin Windows defender to start screen.

  3. Karen

    Thanks for sharing this! This is invaluable. I feel much safer now being able to scan downloaded files BEFORE I open them. Brilliant web site Guys, keep up the excellent work!

  4. c1140887

    Here’s another way: Create the following batch file and put it in your SendTo folder:

    @ECHO OFF
    Echo %1
    “C:\Program Files\Windows Defender\MpCmdRun.exe” -Scan -ScanType 3 -File %1
    PAUSE

  5. Bean

    Ok, so I’m confused about something. Whenever I run this on a file/folder.. I see a console window briefly pop up and then disappear. I’m running Win 8 64-bit. Anybody else having this issue?

  6. jerrod

    thank you so much for this–i actually disabled windows defender and installed AVG just because of this issue. After AVG reeked havoc on my system i removed it and had to go back to using defender, but now this will solve the issue i was having!

  7. jerrod

    scratch my comment above, i dont get the option to scan files at all, and when i try to scan a folder i get the same issue as bean above. Back to the drawing board i guess.

  8. Mike

    There’s a typo in the downloadable registry file.

    The instructions state that icon should be set to:
    %ProgramFiles%\\Windows Defender\\EppManifest.dll

    But after running the registry file, I found that this entry had been created with single backslashes instead of two. changed it and it works fine now.

  9. kayoss

    I have a problem when click “scan with wd defender”:
    “windows cannot access the specified device, path,.. You may not have the appropriate permissions to access the item”.
    Windows 8 64bit Single language. Any idea?

  10. Mike Loux

    same issue as jerrod. I don’t get the option to scan on files, just folders. Folder scan appears to work, however. Just need to test it on a big enough folder so it takes time. :-)

  11. piocis

    Works fine with folders – maybe just because we did it under Computer\HKEY_CLASSES_ROOT\Folder\shell ;-)
    I added the same key under Computer\HKEY_CLASSES_ROOT\*\shell – and now works both with folders and files.
    I’ve also changed the default command key to:
    “C:\Program Files\Windows Defender\MpCmdRun.exe” -scan -scantype 3 -file “%1″
    so now it works even with files that have – (minus) in their name

Enter Your Email Here to Get Access for Free:

Go check your email!