Disable Windows Data Execution Prevention in Windows 7 & Windows 8

The DEP Data Execution Prevention is a security feature that has been available since Windows XP SP2. You will also find this feature in Windows 7, 8 or 8.1.


It’s trying to prevent that certain applications and services can execute code from a non-executable memory region. It’s a useful feature that can help to prevent a buffer overflow and it even helps to fix problems for some games like “Age of Mythology, but it can also cause a lot of problems.

What is the “Data Execution Prevention”, short DEP?

IMPORTANT MUST READ:
Several users reported that they are no longer able to boot their computers after disabling DEP (Data Execution Prevention). Only follow this guide if you know what you are doing. At your own risk! You may lose all data permanently. The solution is to boot into safe mode (F8) and enable DEP again, but it’s not guaranteed to work.

I am posting this solution how to disable and enable the Data Execution Prevention on request of a reader who had serious problems with this feature:

Question asked by Raaghav K.

I was using win7 for little bit time
it was not supporting softwares which were supported by XP
I guessed it to be the Data Execution Prevention in the 7.

While there might be other causes why your software is not running, I’ll try to explain you how you can turn off the DEP.

By the way, I sent a mail to all subscribers that all of your questions are more than welcome. I will try to answer them all, but give me some time so I can answer them properly. You can always post a question on our forums or send me a mail!

Does your CPU support Data Execution Prevention?

  • Open the Explorer (Windows key + E) and right-click on “Computer”. Select “Properties” from the context menu.
  • On the left click on “Advanced System settings”, click on the “Settings” button of the field “Performance”:

Go to the tab “Data Execution Prevention”:

On the bottom you can see if your CPU supports DEP.

If you want to find out if your CPU also supports “Hardware Virtualization”, then I recommend to download the tool:

“SecurAble” (which has been downloaded about 700,000 times!

As you can see above my CPU, an Athlon 64 X2 5000+ supports Hardware D.E.P. and Hardware Virtualization.

You can download SecurAble here.

Although this is about DEP, I want to quickly tell you what Hardware Virtualization is.

Quick Sidenote about Hardware Virtualization

Hardware Virtualization or better “Hardware Assisted Virtualization” is basically the built-in hardware support of CPU’s that is needed to run virtual machines more efficiently:

What the industry has seen lacking was support for virtualization at the hardware level to boost the performance of the VMM. This is because the x86 processor architecture did not previously meet virtualization standards, making virtualization on the x86 platforms difficult. Starting in 2005 both AMD and Intel made changes to their x86 architectures and added virtualization-friendly extensions.

http://www.webopedia.com/

On a second sidenote, Sony Laptops that run Windows 7 will have HardWare Virtualization disabled by default and therefore no Windows XP mode. However, you can re-enable it via BIOS settings.

Read more about it at Gizmodo

How to disable Data Execution Prevention

Alright, as you can see above, you can’t simply disable the feature with a few clicks (that would be too easy, ha!)

1. Step Open the command line: “Start” -> enter “cmd.exe” into search field and hit enter.

2. Step Simply run the following command to disable it:

bcdedit.exe /set {current} nx AlwaysOff

3. Step You can enable it again with:

bcdedit.exe /set {current} nx AlwaysOn

Attention!
If you run this command and you are not able to start Windows, then run Windows in safemode and enable it again, using the command above. Start Windows in safemode by pressing F8 during bootup.

Resources:

5 of 5 0 (100%) 1 vote
- Cheers!

Tags:


Written by:
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common errors and help others to fix them. Aside from that, he loves to fully customize systems with Rainmeter and Dreamscene, find out more about ancient civilizations like the Chachapoya, sharpen his digital photography skills and create software with a small group of selected developers. If you would like to connect with him to discuss anything, send him a mail!

Learn More About.Me

Follow me on Twitter for daily updates: Twitter Follower

Contact The Author:
support@windows7themes.net

Get Free Help

Connect With Our Site:

 

   


Need help? Ask a question at our QA site, click the red button to get started:
Want to support us? Great, simply buy your favorite games from G2A via our referral link (g2a.com/r/win7themes) and save money at the same time:

22 Responses to Disable Windows Data Execution Prevention in Windows 7 & Windows 8

  1. Orange Community Approved Comment:
    Raaghav K. said:

    I will change back to Vista or 7 soon

    Thanks for your support

  2. Orange Community Approved Comment:
    Andrej said:

    I wanted to disable DEP on Windows 7 64-bit. I entered a command:
    bcdedit.exe /set {current} nx AllwaysOff
    I ecieved an answer:
    The boot configuration data store could not be opened. Access is denied.
    Is there any other possibility to disable DEP?

  3. Orange Community Approved Comment:
    sOliver said:

    Did you open an elevated command prompt? That means did you run it with admin privileges? You probably did not. Right-click on cmd.exe and click on “Run as administrator”.

    If you need more instructions read this tutorial:
    http://windows7themes.net/how-to-open-command-prompt-in-windows-7.html

  4. Orange Community Approved Comment:
    Mada said:

    So i used disabling DEP command and now my Windows doesnt start. And I also cant run it in safe mode or in any other mode. What should i do?

  5. Orange Community Approved Comment:
    sOliver said:

    Could you post the error message that you receive when in you try to run Windows in safe mode or does your PC simply restart without error message?

    Try F8 during boot up and then select “Use last working configuration”

  6. Orange Community Approved Comment:
    Mike said:

    Dont do this. I have win7 ultimate x64. i ran this command and i get an i/o error when trying to boot. I booted into repair console and ran the command again (had to specfiy the boot partion — default) and still doesnt boot. two days old installation. Not even startup repair loads now.

  7. Orange Community Approved Comment:
    sOliver said:

    Mike, did you read the guide? Can you boot into safe mode to disable it again?

  8. Orange Community Approved Comment:
    Elliott said:

    I am running cmd as an administrator and when i enter bcdedit.exe /set {current}nx alwaysoff it will say “the element data type specified is not recognised, or does not aplly to the specified entry”

  9. Orange Community Approved Comment:
    Brad said:

    Elliott – looking at your comment on February 5, 2011… it’s not the command line which is giving you problems it is your syntax in the command line
    according to your paste you have no space between nx and {current} and there should be one.
    To those of you getting the message

  10. Orange Community Approved Comment:
    Brad said:

    i accidentally hit enter before completing my post… apologies…

    to those of you getting the message ”
    “the element data type specified is not recognised, or does not aplly to the specified entry”

    that is typically a sign of a syntax error and Windows is trying to think but nothing is happening and that output is our equivalent of DOH!

    You might also want to try removing the caps on Always and Off sometimes that can cause a problem and some times it works with caps.

  11. Orange Community Approved Comment:
    DanglingPointer said:

    Oliver said: “On a second sidenote, Sony Laptops that run Windows 7 will have HardWare Virtualization disabled by default and therefore no Windows XP mode. However, you can re-enable it via BIOS settings.”

    As of 03-18-2010, the hardware virtualization is not the condition to run XP mode.
    ref: http://www.zdnet.com/blog/microsoft/microsoft-removes-hardware-virtualization-barrier-to-running-xp-mode/5607?tag=mantle_skin;content

  12. Orange Community Approved Comment:
    sOliver said:

    Thanks for the update DanglingPointer.. you need to add something to your portfolio by the way! We want to see some 3D models and CG graphics *hehe*

  13. Orange Community Approved Comment:
    Captain_Nukem said:

    I’m using windows vista 32 and i wanted to disable the DEP.
    I entered the right command into the CMD and it said that it was a success.
    But it seems that the DEP is still not disabled…
    In fact i’ve got a new video game called Portal 2 which often crashes because of the DEP, after entering the command and trying to play again i still have the same problem with the the same windows message about DEP…
    I also tried to disable the DEP for the Portal2.exe and it said that it could not be disabled for this program.
    I don’t know what to do now…

  14. Orange Community Approved Comment:
    Mike X said:

    Windows 7 64X and still needing DOS to edit basic fatures in windows. Good going Billy-boy.

  15. Orange Community Approved Comment:
    ziad said:

    HI I ALSO TRIED TO REMOVE IT BY WAY OF CMD AND RESTARTED MY PC ,,,EVEN DOUGH IT SAID IT WAS OFF, WHEN I TRIED TO RUN MY GAME IT STILL WOULDNT ALLOW IT SAYING DEP??? JUST TO SEE I TRIED TO GO TO CMD AGAIN TO PUT IN THAT COMAND AND IT TOLD ME IT IS NOT RECOGNISED I TRIED TO PUT DEP ON AND IT TOLD ME THE SAME THING???? A TECHNICIAN TOLD ME TO REMOVE EXP 9 AND I DID THAT AS WELL BUT DEP IS SOMEHOW STILL THERE, NOW I DONT KNOW IF I CAUSED FURTHER DAMAGE? SHOULD I RESTORE TO FACTORY SETTINGS? WHAT AM I GONNA DO ABOUT THIS PROBLEM?

  16. Orange Community Approved Comment:
    Blnd said:

    Hi There; I am having the same problem like you guys; I have Windows Vista SP2; 64-bit, punched in the command line; and it says Operation Was Successful!

    But When I try to run the game it crashed it before; it still doing the same thing!! DEP. I also used the command line which lets you know that is the statues of your DEP; and after “Operation Was Successful”; it indicates the DEP value is 2!!

    Anyone can suggest another solution please? would be really grateful, many thanks.

  17. Orange Community Approved Comment:
    TGASTT said:

    I’m using Win Ultimate x64, I tried to turn off my DEP and received this message. Any help?

    C:\bcdedit.exe /set {current} nx AlwaysOff
    The boot configuration data store could not be opened.
    The system cannot find the file specified.

  18. Orange Community Approved Comment:
    oliversk said:

    TGASTT you should consider downloading EasyBCD 2.2 Final and make sure to run it from an elevated command prompt – it looks like you don’t have admin rights

  19. Orange Community Approved Comment:
    Ali said:

    Trying to play homeworld 2. When i do the cmd it works but game still immediately crashes saying it has “stopped working.” when I go into windows 7 performance settings the options are greyed out saying i need to use BCDedit and be an administrator. This is a personal laptop and I am the only user/administrator.

  20. Orange Community Approved Comment:
    Ali said:

    and BCDedit.exe wont open. It pops open then closes on its own. went to CMD ran it as admin, ran bcdedit.exe /set {current} nx AlwaysOff, then ran bcdedit.exe and ‘NX’ is indeed off. Game still instantly crashes.

  21. Orange Community Approved Comment:
    Fdy said:

    I’ve already done that and said that the command successful, I Am an Administrator but I cannot open the DEP one, its said that I need to be the Administrator but I am the one. HELP

  22. Orange Community Approved Comment:
    True Grit said:

    Wanting to use cheat codes is not worth bricking your computer, or leaving it wide open for cyber attacks….jus’ sayin’

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *