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:

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.
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:

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:

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:
Internet Safety: How do I keep my computer safe on the internet? Internet Safety is difficult and yet critical. Here are the seven key steps to internet safety - steps to keep your computer safe on the internet.
Article C3053 - June 11, 2007
I had the same problem as chyna. I narrowed it down to the update for "internet explorer 8 for windows vista" i removed this update only and the problem was solved.
Posted by: demonspeed at October 26, 2009 8:45 PMHi!!!
Posted by: Devilmalik at November 1, 2009 3:26 AMI have gone with the above told procedeur and there are some programs I can put on exception list eventhough I want to e.g. firefox
Control Panel/System/Advanced/Startup & Recovery/Settings/Edit.change the last part to NoExecute=AlwaysOff and reboot. Afterwards the DEP will be greyed out. However it did not resolve my problem!
Posted by: T.Williams at November 5, 2009 12:55 PMMy Data Execution Prevention is turn off already but I'm still getting the error when I try to do spell check in my online classes. I don't know what file that would be under to let me turn it off for just that program.
Posted by: Shelly at November 9, 2009 5:20 AMI am having the same problem where I cannot click on any links on any websites becuase I keep getting the DEP error message. This is so frustrating. How do I turn it off and still keep my computer safe? Please help. Feel free to e-mail me. I do not understand how to turn off this feature for specific websites. No matter if I click the button to "Turn on DEP for all essential windows and programs..." or "Turn on DEP for all windows and programs.." I still am getting the error message.
Posted by: Tracy Young at November 9, 2009 12:30 PMIve tried to turn of DEP for a program but it says i must have it for it. DEP stops me from loading it though.
how do i turn of dep for it?
Posted by: michael at November 9, 2009 4:41 PMI have Home Premium Vista. I do not have the "client" visible on my DEP. Should I have client checked? My setting is blank.
Posted by: DanieJo at November 11, 2009 4:19 AMI have tried these steps and I still can not open programs and web sites. Help
Posted by: Michele at November 13, 2009 12:54 PMMy problem is that I keep getting these errors and has to do with internet. My key pad quits working or is really slow then internet explore / aol kicks off/
Posted by: RT at November 16, 2009 2:34 PMHelp
DEP will not let me open internet explorer. i have turned it off and still will not open. I have even uninstalled explorer and re-installed it. Still will not open. Can anyone help me
Posted by: Donna at November 19, 2009 6:19 PM