How to Disable Data Execution Prevention for Explorer.exe

Turn off DEP to prevent error messages and system problems

What to Know

  • Open Control Panel and select System and Security or Performance and Maintenance, and then System.
  • Then, go to Advanced system settings > Settings (under Performance) > Data Execution Prevention.
  • Next, select Turn on DEP for all programs and services except those I select > Add > add explorer.exe.

This article explains how to disable Data Execution Prevention (DEP) in Windows XP SP2 up through Windows 11.

How to Disable DEP to Prevent Error Messages and System Problems

Follow these simple steps to disable DEP for explorer.exe.

  1. Open Control Panel. The quickest way to do this in all versions of Windows is to open the Run dialog box via the WIN+R keyboard shortcut, and enter control.

  2. Select System and Security. If you don't see that option, choose Performance and Maintenance.

    Windows 10 Control Panel

    If you're viewing the icon or classic view of Control Panel, select System instead and then skip down to Step 4.

  3. Choose System.

  4. Select Advanced system settings. It's on the right in Windows 11, and on the left in Windows 10. If you don't see it, open the Advanced tab.

    Windows 11 About window
  5. Select Settings from the Performance area.

  6. Open the Data Execution Prevention tab.

  7. Choose the radio button next to Turn on DEP for all programs and services except those I select.

    Data Execution Prevention tab in Windows 11 Performance Options
  8. Choose Add.

  9. From the Open dialog box, navigate to the C:\Windows directory, or whatever folder Windows is installed in on your system, and select explorer.exe from the list.

    Open dialog box from windows 11 performance options

    You'll need to change the Look in folder at the top and will probably have to scroll through several folders before reaching the list of files. Explorer.exe should be listed as one of the first few files in the alphabetical list.

  10. Select Open followed by OK to the warning that pops up.

    Back on the Data Execution Prevention tab, you should now see Windows Explorer in the list, next to a checked checkbox.

  11. Select OK at the bottom of the Performance Options window.

  12. Select OK when the window appears warning you that your changes require a restart of your computer.

  13. Restart your computer.

After your computer restarts, test your system to see if disabling Data Execution Prevention for explorer.exe resolved your issue.

If disabling DEP for explorer.exe didn't fix your problem, return the DEP settings to normal by repeating the steps above, but in Step 7, choose Turn on DEP for essential Windows programs and services only.

How to Completely Turn Off DEP

If you need to disable DEP completely during your troubleshooting process, you can do so, but it's not easy. Microsoft doesn't provide a simple button like described above. Instead, you have to run a very specific command to disable DEP.

Open an elevated Command Prompt, and execute this command:

bcdedit.exe /set {current} nx AlwaysOff

Restart your computer to apply the command.

DEP exists to ensure that the software on your computer use memory safely. To set it back to its default state, run this command (and follow with a reboot):

bcdedit.exe /set {current} nx OptIn
Was this page helpful?