This tutorial will show you how to Disable Data Execution Prevention in Windows 8 and Windows 8.1

What is Data Execution Prevention?

DEP- Data Execution Prevention is a security feature and is included in most of the modern operating systems.
It is available in Microsoft Windows, Linux, Mac OS X, iOS and Android operating systems. It is implemented to prevent an application or service from executing code from a
non-executable memory region.
Data Execution Prevention (DEP) was started first with Windows XP and Windows 2003 Server, its main purpose was to provide system-level memory protection feature.

DEP

DEP empowers the system to mark one or more pages of memory as non-executable, i.e. the code cannot be run from that region of the memory. Code cannot be even accessed from default heaps, stacks, and memory pools. If any application tries to access the code from the protected section, an exception occurs and hence the process is terminated if the exception is not handled.
DEP runs in two modes :-

  1. Hardware-Enforced DEP for CPUs that can mark memory pages as nonexecutable
  2. Software-Enforced DEP for CPUs that do not have hardware support

There are two methods to enable or disable data execution prevention in windows 8

First Method

1. Right-click on Computer icon on the desktop and click Properties.

Click Properties

2. Click on Advanced System Settings.

Advanced system settings

3. Now, click on the settings button under the Performance label.

Click Settings
4. In the Performance Options window select the Data Execution Prevention tag. Enable/Disable the DEP and click OK.

Click OK

Second Method

1. Open the Run Window by pressing Window + R buttons, type cmd and press Enter.

Run cmd

2. Disable DEP – Type bcdedit.exe/set{current} nx AlwaysOff
Hit Enter.

Disable DEP

3. Enable DEP – Type bcdedit.exe/set{current} nx AlwaysOn
Hit Enter.

Enable DEP

Check this link, if you are facing The value is protected by secure boot policy and cannot be modified or deleted error.

About 

Susham is a part time blogger and a Software Engineer by Profession. He has keen interest in latest Gadgets and Tech updates. Like us he is also passionate about Windows 8.

20 COMMENTS

  1. my cmd reports : The boot configuration data store could not be opened. Access is denied.
    p.s I am onley computer user

  2. Great work Nick as always… however, I did open Run with “Administrator Privileges” but am still getting the same as edin… The boot configuration data store could not be opened. Access is denied.

    HELP 🙂

  3. Scratch that Nick…. it says “an error has occurred setting the element data. The value is protected by secure boot policy and cannot be modified or deleted.”

    • Hi Charlie, please follow the steps below :
      Search for “Advanced System Settings” in “Settings Search”. Under Settings search you will get the option in left pane. Click on it then
      Under Performance, click Settings.

      Click the “Data Execution Prevention”{ tab, and then click “Turn on DEP for all programs and services except those I select”.

      Cheers
      Nick

    • Use Admin Command prompt and please see the screenshots… make sure you are typing the command correctly. Don’t copy-paste it.. try to type manually.

  4. Hi nick:
    I tried two ways of exhibiting in this post. In the first, I get the following message:

      “This program must run with data execution protection (DEP) enabled. Unable to disable DEP for this program.”

    In the second, shows me this error:

    “Failed to set data element. The value is protected by secure boot policy and can not be modified or deleted.”

    The two procedures are run as Administrator.

    PLEASE HELP! From already thank you very much.

    • Hi Fransisco,

      Try to run these command :
      bcdedit.exe /set nx AlwaysOff

      Make sure you are using an Admin account and using Elevated Command Prompt.

      Let me know the result.

  5. I was getting the same “the value is protected by secure boot policy and cannot be modified or deleted” error, though I was running command prompt as admin.

    So I had to disable the Secure Boot Policy from BIOS

    Here are the steps I followed and it has worked:
    1. Go to right bar (win+c)->Settings ->Change PC Settings (on the bottom)
    on the next screen PC Settings
    2. General->Advanced Start Up (at the far bottom)
    next screen
    3. Troubleshoot -> Advanced Options ->UEFI Firmware Settings->Restart
    Once the computer restarted, it went to the BIOS

    I have a LifeBook N Series laptop, so on the SECURITY Tab I could not change the settings for Security Boot Policy.
    I had to set a SUPERVISOR password and then I was able to [DISABLE] the Security Boot Policy
    Exit and Save Changes

    when the computer restarted, went to command prompt (admin) (by pressing win+x you can find this option easily) and
    the command that worked was:

    bcdedit.exe /set nx AlwaysOff

    (the command with the /set{current} was not recognized)

    Hope that helps.

    • Hi pavlos thanx for sharing the complete steps. In my previous comment I have already mentioned to try the command:

      bcdedit.exe /set nx AlwaysOff

  6. Data Exceution Prevention settings greyed out ( Error : To use these settings, you must be a computer administrator and you must use the bcdedit.exe file) :

    Screenshot : http://img452.imageshack.us/img452/7967/depproblemcx4cg1.jpg

    if you face this issue than try :-

    1. Run a CMD as Administrator.
    2. enabling DEP:
    bcdedit.exe /set {current} nx AlwaysOn
    bcdedit.exe /set {current} nx optin

    OR
    disabling DEP:
    bcdedit.exe /set {current} nx AlwaysOff

    3. Restart PC.

  7. but when i try to turn off the bcdedit in cmd at administrator mode it shows”An error has occurred setting the element data.
    The value is protected by Secure Boot policy and cannot be modified or deleted.”. so now what should I do to turn it off.

  8. Hi nick can you fix this problem to use these settings you must be a computer administrator and must be used bcdedit.exe

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.