How to Enable or Disable DEP in Windows 10

In this post, you will learn how to enable or disable DEP (Data Execution Prevention) in Windows 10.

You will also see how to create a DEP shortcut. Let’s begin with the former. 

Here are the steps to disable DEP completely:

Open elevated Command Prompt.

Press Enter after typing the following command.

Here’s the command: bcdedit /set {current} nx AlwaysOff

Restart your computer.

That’s all.

When you execute the command, you may receive the following error message:

An error has occurred setting the element data.

The value is protected by Secure Boot policy and cannot be modified or deleted.

This means that the Secure Boot feature is turned on and needs to be disabled for this command to work.

Follow these steps to enable DEP for all processes:

Open elevated Command Prompt.

Press Enter after typing the following command.

Here’s the command: bcdedit /set {current} nx AlwaysOn

Restart your PC.

Note:

Once any of the commands have been executed successfully, go to the Advanced tab of the System Properties window.

In the Performance section, click the Settings button.

Navigate to Data Execution Prevention.

As you can see, the options are grayed out. To use these options, follow these steps:

Open elevated Command Prompt.

Press Enter after typing the following command.

Here’s the command: bcdedit /set {current} nx OptIn

Restart your computer.

That’s all. You can now use the options and the “Turn on DEP for essential Windows programs and services only” is selected.

Steps to Create a DEP Shortcut

To create a DEP shortcut on your Windows 10 desktop or File Explorer, follow the steps below.

Right-click on the blank area of the desktop or File Explorer.

In the context menu, click “New” and then “Shortcut.”

In the “Create Shortcut” pop-up window, type systempropertiesdataexecutionprevention and click “Next.”

If you don’t like the suggested shortcut name, enter your own.

Click on the “Finish” button.

Read: