Ask Leo! by Leo A. Notenboom

How do I turn off Data Execution Prevention errors?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Windows » Windows Configuration

Summary: Data Execution Prevention, or DEP, can prevent certain types of malware exploits. Unfortunately not all programs are compatible with DEP.

How do I get rid of Data Execution Prevention? Such a pain. It wouldn't allow me to view photos inside a photo folder ... I followed the route given by the "crash message" but I want it off my machine. Any ideas?

First let's be clear: Data Execution Prevention, or DEP, isn't something you "remove" or "get off your machine". It's simply a feature that can be turned on or off, or be configured.

I'll show you how to turn it off, but then I'll tell you why you shouldn't and what you should do instead to solve your problem.

What is DEP?

Start by realizing that as far as your computer is concerned, everything is just numbers. The text you're seeing? That's all stored as numbers with each number representing a different letter or character. Programs that you run? Numbers too: the instructions that tell the computer what to do are simply numbers.

From that example we can draw an important distinction: there's "code", or the instructions that tell a computer what to do, and there's "data", the information that the computer works on. But both code and data are stored as numbers.

Now, what hackers and virus writers have been able to do is exploit unpatched vulnerabilities that allow them to a) put what they want into data, and then b) trick the computer into executing that data as if it were code. That's one way they gain control of a machine and infect or otherwise compromise the machine.

Data Execution Prevention is exactly what it sounds like: the operating system, using either hardware, software or both, depending on the processor's capabilities, traps the attempt to execute data as if it were code. It's a very effective technique at blocking malware even if the vulnerability being exploited hasn't even been publicly exposed yet.

So what's the problem?

Some legitimate programs execute data as if it were code on purpose. Without getting into a lot of geeky details, it's sometimes an effective way to write very efficient code. If I'm not mistaken, older versions of Windows did something very similar to speed up graphics operations, for example. Since you mention viewing pictures, I'm guessing you were using an older version of IrfanView which was also known to do this.

Turning Off DEP

You can, if you like, turn off DEP completely.

  • Right click on My Computer

  • Click on Properties

  • Click on the Advanced tab

  • Click on the Settings button in the Performance section

  • Click on the Data Execution Prevention tab

At this point you should be looking at a dialog much like this one:

Data Execution Prevention Options

Select the item labeled "Turn on DEP for essential Windows programs and services only". This, effectively turns off DEP for everything else. Your image viewer should now work.

"If you have a program you know is legitimate that happens to cause DEP errors, you can add it to the list of exceptions."

But as I said at the beginning, in my opinion, this isn't what you should do.

Configure Exceptions to DEP

If you have a program you know is legitimate that happens to cause DEP errors, you can add it to the list of exceptions.

As you can see in the image above, the default DEP setting is to "Turn on DEP for all programs and services except those I select:". So, a much better way to get any legitimate program causing DEP errors to work again is to add that program to the exception list.

Click on the Add... button. Now, locate the program's ".exe" file. I don't happen to have IrfanView, but I'll use Foxit Software's PDF reader as a random example:

Specifying a DEP Exception

In this example the program was located in " C:\Program Files\Foxit Software\Foxit Reader\Foxit Reader.exe". The program you're looking for will, of course, be elsewhere, but most likely somewhere within "C:\Program Files".

The result should look something like this:

Data Execution Prevention Options with exception added

You can see that the program I specified has been added to the list of exceptions. It will not be protected by DEP, but everything else in your system will be.

That's a much safer way to run.

Related:

Article C3053 - June 11, 2007

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
32 Comments

Hi Everyone,

I know that this DEP issue is a major problem for a lot of people and I have been dealing with the DEP error with IE 7.0 issue all day until I finally found this site!

bcdedit.exe worked for me but to clarify, the only way I was able to make it work was to take out {current}. Be sure you are an Administrator when you do this but it solved my very annoying IE 7.0 issue! I don't intend on turning DEP back on since it seems to cause more problems than it's worth.

bcdedit.exe/set nx AlwaysOff
bcdedit.exe/set nx AlwaysOn

GOOD LUCK! I would uninstall VISTA if I could!

Posted by: Daniel Paul Alberts at February 5, 2009 4:07 PM

"I've just had this a couple of days ago. Seemingly working iTunes suddenly stops working, Vista warns of DEP problems.

I re-installed iTunes 8 - same issue.
Turned off DEP - iTunes still crashed.

Turned out it was an installation of a CODEC pack for Vista that must have corrupted QuickTime. Nothing to do with iTunes after all.

Uninstalled QT.
Uninstalled the codec pack
Installed QT from the stand-alone installation

iTunes immediately runs again.

I've since turned DEP back on, just to be safe"-fatbloke

i found this at the forums and thought it would help...i just don't know how to remove this codec lol

Posted by: manuel siordia at February 6, 2009 10:12 AM

Data Execution Prevention, I would say it's a dangerous portion of Windows Operating System because this is the second time I have had this since three years apart, I forgot how to work around this. It does not seem to revert into orginal working state! Nothing have helped especially the command-line excution works even!

My problem is the iexplorer.exe stopped working after I clicked on MSN messenger for checking e-mails. This always been working ever since I've used it up until just recently tonight (spent an entire evening that is, tofigure how to fix it). Imagine me being a I.T. personnel can't solve this. I even asked someone whom knows as much as I do, also says it's an inevitable error.

Posted by: hyde at March 1, 2009 12:05 AM

I found a way to solve this problem!!! “restore”

1. start button
2. run
3. enter “msconfig”
4. select “tool” tap
5. select “System restore”
6. Restore you computer configurations to the date last working

Good luck.

Posted by: Mairs at March 22, 2009 11:29 PM

I had posted a question on yahoo answers related to a problem on my computer. Here is the question
http://answers.yahoo.com/question/index?qid=20090429023644AAr3V9u

In case you can spare the time, I would like to know if its a problem with DEP or something else that can be solved.
Thank you :)

Posted by: Iceman at May 5, 2009 1:26 AM

I have the Data error too, but in my case it tells me that windows explorer is the program causing the problem. What would one do in a case like this, add it or not, as it is not a program, could I be indeed tricked by a hacker perhaps? I will leave it as it is for the moment till I can get some clarification about this, I hope someone out there can assist with any ideas/solutions - thank you!

Posted by: Barry at May 19, 2009 2:41 PM

I am also having problems with the Explorer 8 "update". Formerly my computer worked very well. Now I am not being allowed to go to certain websites. These are horribly dangerous things like Discovery News and Doonesbury comic strips. Also, most live links don't work any more, and the internet is horribly slow.
I DID go and try to reconfigure the DEP -- does not work. When I excepted Windows Explorer I was able to reach a couple of Discovery News articles, but the Doonesbury site still does not work.
I cannot follow your advice to except programs, as this is an internet site, not one of my own programs. I believe from a note that flashed on the screen that there is something to do with Adobe Flash player, but what and how I do not know.
Anyway, I already have a firewall, antivirus, two anti-adwares, and several other security programs operating. I do not need Windows to come in and slow down my computer and stop access to websites in order to duplicate things that were already working well. I do want this thing off my computer.
A reply would be helpful.

Posted by: victoria at June 13, 2009 6:46 PM

Hi Leo! I've only had DEP problems while using the internet. Before I downloaded IE8 my computer ran great. Now it closes IE when I go to various sites that I know are save. It also closes when I try to respond to emails. I've tried everything from your article and still have problems. This seems to be a common question. Thank you for your help!

Posted by: scott at June 18, 2009 8:49 AM

i try all the things in my machine but i got error msg actually i create a mpeg file from pinnacle and whenever i just click on the mpeg file 'data execution prevention' error msg appear even i cut and paste file to another location but still problem persist.i can'nt understand pl help me what should i do,is it any hardware problem or somthing else.pl....

Posted by: Amitabh Sarkar at June 21, 2009 6:08 AM

DEP errors can be caused by rogue startup files. Using MSCONFIG, turn off all startup files and see if the problem is solved. If it is, reapply the startup items one by one until the rogue item is found.

Posted by: Mikado at June 26, 2009 12:57 AM

Post a comment on "How do I turn off Data Execution Prevention errors?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Question? Ask Leo!