Enable or disable data execution prevention (DEP).

Stefan
Enable or disable Data Output Prevention (DEP).

Data Execution Prevention (DEP) is also known as “Data Execution Prevention”. It is a security feature in Windows that prevents dangerous code from running on your computer.

DEP works by marking certain parts of memory as “non-executable”. When a program tries to execute code from one of these “unexecutable” marked areas (easy to say), an exception is thrown and the program is terminated. This helps prevent malicious code from running on your computer by making it more difficult for attackers to inject code.

By default, “Data Execution Prevention” (“DEP”) is enabled for all necessary system processes in Windows and for programs that enable DEP via a special code in their header.

In some cases, you may need to enable DEP for specific programs, or you may need to disable DEP because of compatibility, mainly in 32-bit apps. This is how it works.

Enable or disable data execution prevention (DEP).

Change Data Execution Prevention settings

To enable or disable Data Execution Prevention (DEP), open the Windows Explorer. Then right-click on “This PC”. In the menu click on “Properties”.

These PC properties

Then click on “Device specifications” and then on “Advanced system settings”.

Advanced system settings

In the system properties, click on the “Advanced” tab and then on the “Settings” button in the performance settings.

Performance settings

Click on the “Data Execution Prevention (DEP)” tab to change the settings. You can now “Enable DEP for essential Windows programs and services only” or you can “Enable DEP for all programs and services except those selected below”.

So if you want to disable DEP for a particular app, you can click the “Add” button and exclude the app from “Data Exection Prevention”.

Read also
Change the action of your computer's power button in Windows 11

Enable or disable Data Output Prevention (DEP).

Disable Data Execution Prevention completely

If you want to completely disable Data Execution Prevention (DEP), you can do so as follows.

Open a Command Prompt as administrator. In the Command Prompt, copy and paste the code below to disable Data Execution Prevention completely.

bcdedit.exe /set {current} nx AlwaysOff

To re-enable Data Execution Prevention, change “AlwaysOff” to “AlwaysOn”. This is the command:

bcdedit.exe /set {current} nx AlwaysOn

The value is protected for Secure Boot policies and cannot be changed or deleted

If you cannot disable DEP due to the error message:

“The value is protected by Secure Boot/policy and cannot be changed or deleted”

Then you switch Secure Boot or “Secure Boot” in the BIOS/EUFI if necessary.

I hope this helped you. Thank you for reading!


Problem solved?


Help other people too.
Share this article on a website, forum or via social media.

Join our new computer forum for questions and computer help.
Do you have a computer question?

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