Enable, Disable Data Execution Prevention (DEP) in Windows 7| 8

We have already seen how Data Execution Preventiona security feature can help prevent damage to your computer from viruses and other security threats. Harmful programs who try to attack Windows by attempting to execute code from system memory locations reserved for Windows and other authorized programs, are stopped. These types of attacks can harm your programs and files. DEP can help protect your computer by monitoring your programs to make sure that they use system memory safely. If DEP notices a program on your computer using memory incorrectly, it closes the program and notifies you. It is as such a security feature.

While it is not recommended, you may have your reasons for wanting to disable Data Execution Prevention on your Windows computer. Lets us see how to disable DEP in Windows 8 | 7 using the bcdedit.exe tool.

Disable Data Execution Prevention

In Windows 7, type cmd in Start Search. Right click on search results ‘cmd’ and click on Run as Administrator. Windows 8 users can also open an elevated command prompt window via the WinX menu.

Then, copy paste the following and hit Enter:

bcdedit.exe /set {current} nx AlwaysOff

cmd off Enable, Disable Data Execution Prevention (DEP) in Windows 7| 8

Reboot.

You will find that Data Execution Prevention has been disable on your Windows computer. You may then, if you wish, verify the status of Data Execution Prevention feature on your system.

Enable Data Execution Prevention

To enable back DEP, type the following in an elevated command prompt and hit Enter:

bcdedit.exe /set {current} nx AlwaysOn

cmd oon Enable, Disable Data Execution Prevention (DEP) in Windows 7| 8

This will enable back Data Execution Prevention.

See this if you receive The boot configuration data could not be opened message.

In the next few days, we will also show you how to:
  1. Enable or Disable Data Execution Prevention (DEP) for Internet Explorer only
  2. Turn Off or On Data Execution Prevention (DEP) for Individual Programs.
Posted by on , in Category Windows with Tags
Anand Khanse aka HappyAndyK is an end-user Windows enthusiast, a Microsoft MVP in Windows, since 2006, and the Admin of TheWindowsClub.com. Please create a System Restore Point before trying out any software & be careful about any third-party offers while installing freeware. Add me on Google+.
  • maxxxem

    Thank you!

  • Kalpesh Parmar

    I followed your command on cmd with ‘open as admin”..But it shows “An error has occurred setting the element data.The value is protected by Secure booy policy and cannot be modified or deleted.”

  • Jorge Carniel

    Thank you so much!

  • http://www.thewindowsclub.com Anand Khanse

    You are welcome. :)

  • thejynxed

    If you’re using Windows 8 or a UEFI boot instead of BIOS, you have to disable the Secure Boot function before this will work.

  • James

    Hi, unfortunately when I type in “bcdedit.exe /set {current} nx AlwaysOff” it responds with “The boot configuration data store could not be opened. Access denied.” how do i fix this?

  • Vinz

    how to fix always enable Dep? i do all the right ways to enable again my DEP by typing this bcdedit.exe /set {current} nx AlwaysOn then restart. after that my DEP still disabled :< Im using windows 7 ultimate

  • Vinz

    how to fix always enable Dep? i do all the right ways to enable again my
    DEP by typing this bcdedit.exe /set {current} nx AlwaysOn then restart.
    after that i restarted pc and my DEP still disabled :< Im using windows 7 ultimate

  • Tbone

    Thanks this fixed an issue I had with DEP and Windows Server 2012r2

  • Mantas Tipo

    i have problem i open cmd on administrator then i copy that bcdedit.exe always on …. but then when i restart pc i go to computer properties advanced , then options and data execution prevention then it says if you want use this options you need to be computer administrator and use bcdedit.exe file and then search for microsoft base in internet help me plz it was on windowns 7

  • Mantas Tipo

    yes this problem is to me too on windows 7 who can help us plz

  • Jason Kustra

    Very helpful and very easy. Thank you!

  • Sarp Karaca

    the boot configuration data store could not be opened access is denied

  • Dalton DuPaul

    The boot configuration data store could not be opened.
    The system cannot find the file specified.

    Any Suggestions?

  • Guest

    You have to run the command prompt as an administrator. Open the start menu, type CMD in the search field, and wait for cmd to pop up. Right click CMD and select “Run as Administrator.”

  • Washbourne

    You have to run the command prompt as an administrator. Open the start
    menu, type CMD in the search field, and wait for cmd to pop up. Right
    click CMD and select “Run as Administrator.” This will solve it.

  • Eriwanto Panjaitan

    To enable the options back, you must run this code on command prompt with administrator access

    type bcdedit.exe /set {current} nx AlwaysOn, press enter
    then type bcdedit.exe /set {current} nx optin, press enter

    restart PC to take affect

    more information here:

    http://answers.microsoft.com/en-us/windows/forum/windows_vista-performance/how-to-enable-dep-options-mine-are-grey-and-i-cant/2663dc18-72de-4729-b9ef-de398a7ca756

  • Carlos Junior

    Just run it as administrator =)

  • wizz ahmed

    access denied when i type those command in windows 8.1

  • Saran Sara

    Data Execution Prevention Options Not Available Or Data Execution Prevention Choosing Options hided…if you want i send the image your mail ID…please reply me…..

  • fotis

    i try this one but he tell me this…http://prntscr.com/5hipeu any help?

  • http://www.thewindowsclub.com Anand Khanse

    Please see: forum.thewindowsclub.com/windows-tips-tutorials-articles/36510-fix-boot-configuration-data-could-not-opened.html

  • Recent Comments