What is Data Execution Prevention?

Category: Windows

I keep getting an error that says 'Data Execution Prevention - To help protect your computer, Windows has closed this program.' What is Data Execution Prevention, and why is it suddenly blocking programs that I've been using for years?

Turn off Data Execution Prevention

Data Execution Prevention - Friend or Foe?

DEP, which stands for Data Execution Prevention, is a Microsoft technique for preventing the execution of presumably unauthorized software in RAM memory. DEP protects against a common technique used by malware writers: the exploitation of memory buffer overflow bugs in Windows and other software applications. A buffer overflow creates an opportunity for malware to insert itself into parts of RAM that are not normally used for running programs, and then run itself from there. DEP blocks execution of programs from areas of RAM marked "non-executable". Malware based upon buffer overflow exploitation is dead as a brick, it can't do anything.

DEP provides the most protection when it is implemented in hardware, less when it is implemented by the operating system software. Instead of preventing rogue software from executing in memory, software-based DEP simply enforces a rule that for any program which encounters an exception (an unexpected error), the exception must be listed in a table inside the program. In other words, the unexpected error must be one that the programmer anticipated.

It's a good idea to ask if a PC you are considering purchasing supported hardware-based DEP. On Intel-based processors, the feature you want is called "eXecute Disable" or the XD bit. For AMD machines, look for the Enhanced Virus Protection feature.

Is DEP on My Computer?

DEP was first introduced in Windows XP Service Pack 2. The DEP feature was installed, but not activated at that time. If you run XP and have received the Internet Explorer 8 update, then DEP is present and active. It's also standard on Vista and Windows 7 systems.

When DEP Strikes...

Although DEP is supposed to protect you, in some cases DEP can cause problems by preventing you from running certain programs that are NOT harmful. This happens sometimes with older programs, and browser addons that were written for IE6 or IE7. Others report that after DEP is enabled, Internet Explorer will not function at all.

DEP sometimes displays no hint that it has prevented a program from executing, leaving you to scream in frustration, wondering why the software you're trying to run or install won't work.

Turning Off DEP

If you're seeing the "Windows has closed this program" error, or experiencing random lockups, you might be looking for a way to disable DEP on your computer. You can also specify that specific programs should be allowed to run without DEP protection.

To disable DEP on a Vista or Windows 7 computer, click the Start button, then open the Run box and enter this command: bcdedit.exe /set {current} nx AlwaysOff

On an XP system, you'll have to open the C:\BOOT.INI file with Notepad (or your favorite text editor), find the NoExecute string, and change it to read: /NoExecute=AlwaysOff

To leave DEP on, and specify that certain programs should run without DEP protection:

  • Open Control Panel
  • XP ONLY: Switch to Classic View
  • Click on System
  • Click Advanced System Settings. (On XP: click Advanced tab)
  • Click the Settings button under Performance
  • Select the Data Execution Prevention tab
  • Note that on the bottom of this window, you can see whether or not your computer supports hardware-based DEP
  • Check the radio button to apply DEP to all programs except those you are now going to specify
  • Add programs to the list below the radio button
  • Close everything by clicking OK several times

Just be warned that turning off DEP could needlessly expose you to security hazards. Whenever possible, try to identify the program that DEP doesn't like, and either remove it or find a newer (more secure) version that works with DEP.

Do you have comments or questions about Data Execution Prevention? Post your comments below...

Ask Your Computer or Internet Question

  (Enter your question in the box above.)

It's Guaranteed to Make You Smarter...

AskBob Updates: Boost your Internet IQ & solve computer problems.
Get your FREE Subscription!


Check out other articles in this category:

Link to this article from your site or blog. Just copy and paste from this box:

This article was posted by on 24 Sep 2009

For Fun: Buy Bob a Snickers.

Prev Article:
What Does System Restore Do?

The Top Twenty
Next Article:
Gems and Minerals

Most recent comments on "What is Data Execution Prevention?"

Posted by:

Mike S
24 Sep 2009

Another good reason not to use Windows.

EDITOR'S NOTE: You mean because Linux and/or Mac OS have some form of data execution protection built in?

Posted by:

23 Jun 2010

I have a computer that has hardware based DEP via the CPU. I'm using WinXP SP3 32-bit and Windows 7 64-bit on this machine. Since DEP is enabled in both OS', does this mean that only hardware based DEP is being used or is Windows using software based DEP too?



Posted by:

15 Jul 2010


The Data Excecution Prevention has prevented to aven click the START icon on the bottom of the monitor making it impossible top de-activate it, the windows button on the key bord is not responding aswell. If anyone can help, please assist.

Posted by:

31 Jul 2010

You say to list programs in the box in dep except those I list here. What is the format for listing them? Or shall I say; How do I spell them out so that the computer recognizes the program I am trying ti specify? I have found no example anywhere.

Post your Comments, Questions or Suggestions

*     *     (* = Required field)

    (Your email address will not be published)
(you may use HTML tags for style)

YES... spelling, punctuation, grammar and proper use of UPPER/lower case are important! Comments of a political nature are discouraged. Please limit your remarks to 3-4 paragraphs. If you want to see your comment posted, pay attention to these items.

All comments are reviewed, and may be edited or removed at the discretion of the moderator.

NOTE: Please, post comments on this article ONLY.
If you want to ask a question click here.

Free Tech Support -- Ask Bob Rankin
Subscribe to AskBobRankin Updates: Free Newsletter

Copyright © 2005 - Bob Rankin - All Rights Reserved
Privacy Policy     RSS/XML

Article information: AskBobRankin -- What is Data Execution Prevention? (Posted: 24 Sep 2009)
Source: https://askbobrankin.com/what_is_data_execution_prevention.html
Copyright © 2005 - Bob Rankin - All Rights Reserved