Ask Leo!

How do I turn off Data Execution Prevention errors?

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 in to 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 11591 | Posted June 11, 2007

Recent Comments
61 Comments

Dear Leo,
I'm having the same problem as eric and zoe running on vista. please help!

Posted by: chris at September 20, 2008 6:06 PM

I have windows vista and I am trying to open Msn messanger however, as soon as I try to open the program a message appears and tells me that a problem caused the program to close. it is DEP which is causing this problem. I can't find msn messanger which is DEP compatible. Can you please help me?

Posted by: Ann-Marie Camiller at September 23, 2008 1:28 AM

I am haveing a big problem with my computer. Every time I go to open a video clip or a movie on my computer. my windows exploerer crashes. and i get a send report dont send report message along with the white screen of death and my desktop disapears. and all programs close. I have done multiple scans of my computer and all clean but i can not get this to stop. can you please help me. thank you

Posted by: Michael at September 23, 2008 7:40 AM

I also get A DEP error now and again when i try and open the same files and then i get the crash. I tried what you said up top but no help.

Posted by: Michael at September 23, 2008 7:45 AM

I have windows vista and I am trying to open Msn messanger however, as soon as I try to open the program a message appears and tells me that a problem caused the program to close. it is DEP which is causing this problem. I can't turn off DEP for this program, it says it needs DEP to run. I can't find msn messanger which is DEP compatible. Can you please help me?
Stella

Posted by: Stella McGraw at September 30, 2008 3:29 AM

Like many others who have posted a comment before me, the item I want to turn DEP off for gives me the error that says the program must run with DEP on. How do I avoid this? That is actually the reason I read this article, I assumed that what your article included was easily found out if you click the bubble it brings up when the crash occurs. I hope you edit it to fix the problem many of us found this article for.

Posted by: Kamir at September 30, 2008 6:43 PM

Hi similar problem, except dep is stopping my internet explorer 8 from starting? How do i stop it. I have tried adding to the list of programs that dep doesnt stop and it still wont let me on it. thanks

Posted by: Andy at October 4, 2008 3:20 AM

Can someone please give us an answer? We want to run MSN messenger without it being closed everytime we try. Someone out there probably knows how to fix this. Please please help.

Posted by: Stella McGraw at October 4, 2008 4:02 AM

i have windows vista and I am trying to open Msn messanger however, as soon as I try to open the program a message appears and tells me that a problem caused the program to close. it is DEP which is causing this problem. I can't find msn messanger which is DEP compatible. Can you please help me?

Posted by: gee at October 4, 2008 11:20 AM

Probably not a great idea to turn DEP completely off but if you feel you must and have strong security software here is how to turn it off for Win XP. Right click My Computer click properties then click the Advanced tab, then click the setting button in Startup and recovery section. Click the edit button which will open a notepad file. You'll see a line Where it says: "noexecute=optin". Change the word "optin" to AlwaysOff, then click file, choose save, close the notepad file then click ok to close all open windows and reboot the computer. Of course to turn it on again change it back to "optin" and reboot. Hope this helps

Posted by: Simon Main at October 4, 2008 6:05 PM

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)

New!

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

Before commenting, please...

Please wait. Your comment is being processed ...


Ask Your Question:


ask-leo.com
Web

Stay Informed

Weekly Newsletter

Archives

By Category
By Date

Advertisers

Advertise on Ask Leo!

««   »»

Question? - Ask Leo!
Who is Leo?
Link to Leo!

Terms, Conditions & Privacy