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?
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.
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.
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
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.
I will change back to Vista or 7 soon
Thanks for your support
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?
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
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?
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”
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.
Mike, did you read the guide? Can you boot into safe mode to disable it again?
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”
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
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.
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
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*
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…
Windows 7 64X and still needing DOS to edit basic fatures in windows. Good going Billy-boy.
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?
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.
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.
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
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.
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.
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
Wanting to use cheat codes is not worth bricking your computer, or leaving it wide open for cyber attacks….jus’ sayin’