What Is Data Execution Prevention(DEP) And How To Disable It In Windows 7 / Vista

What is DEP ?

In Microsoft’s own words,

Data Execution Prevention (DEP) is a security feature that can help prevent damage to your computer from viruses and other security threats. Harmful programs can try to attack Windows by attempting to run (also known as execute) code from system memory locations reserved for Windows and other authorized programs. These types of attacks can harm your programs and files.

DEP can help protect your computer by monitoring your programs to make sure that they use system memory safely. If DEP notices a program on your computer using memory incorrectly, it closes the program and notifies you.

Why disable DEP ?

I was running multiple processes on different tabs in Firefox 3,  finally my Firefox crashed and Microsoft gave a very beautiful reason for the crash which you have read above. Actually it happened the moment I clicked on a YouTube video, it sounds weird, right? If you are a heavy geek like me, who works on multiple Firefox tabs and also use online services that need to access your system memory, then your Firefox is definitely going to crash unless you don’t disable DEP. Another reason to disable it is when it does not allow you to open Executable files that needs to access your system memory.

Note: Only disable DEP if your executable file is not getting installed or if your Firefox is crashing all the time(and Microsoft keeps giving DEP excuse).

How to disable DEP ?

Go to Start, right click on Computer and finally click on Properties. Now in the System window click on Advanced System Settings in the left sidebar as shown in the screenshot below.

vista system

Now in the System Properties Windows, under Performance click Settings as shown in the screenshot below.

System properties

Finally in the Performance Options windows, navigate to Data Execution Prevention tab and select the second option “Turn on DEP for all programs and services except those I select:” as shown in the screenshot below.

performance option

Now suppose you have to disable DEP for some executable file, just click on Add, and then select the file to add it in the list and you are done. :)

Well you can’t add Firefox because it is not an executable file, but it pretty much solved my problem.

Alternative Method – Disabling DEP completely from Command Prompt

Warning: Do not use this option if you are not an administrator. Make sure that you fully understand what you are doing.

From the Start menu, select All Programs, then go to Accessories and then finally right-click on Command Prompt and click Run as Administrator.

Once the command prompt is open, you can now disable the DEP by entering the following command line.

bcdedit.exe /set {current} nx AlwaysOff

Keep the Command Prompt open and run the executable file that DEP was preventing from running before. After you are done with the installation, simple type this command line to enable DEP back on again.

bcdedit.exe /set {current} nx AlwaysOn

command prompt DEP

If you want to completely disable DEP then you will have to remove “{current}” from the command line.

bcdedit.exe /set nx AlwaysOff

And to enable it back,

bcdedit.exe /set nx AlwaysOn

After you execute using the command prompt, the options from Data Execution Prevention tab in Performance options will vanish.

You can use OptIn and OptOut to give it a purpose,

OptIn – Enables DEP only for operating system components, including the Windows kernel and drivers.

bcdedit.exe /set nx OptIn

OptOut - Enables DEP for the operating system and all processes, including the Windows kernel and drivers. However, administrators can disable DEP on selected executable files by using System in Control Panel.

bcdedit.exe /set nx OptOut

Recommendation: I would recommend that you try the first method, if it fails, then you can try this second method(command prompt method) only if you are an expert user.

Comments, Questions, and Suggestion, all are welcome in the comments :)

  • Share this article!

    • Digg this!
    • Bookmark on Reddit
    • Bookmark at Delicious
    • Stumble this!
    • Share this post at Facebook
    • Tweet this!
    • Share on Yahoo! Buzz
    • Add AddictiveTips to your Technorati favorites
    • Share on Friendfeed
This entry was posted in Windows and tagged , , , , , , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

15 Comments

  1. Joan Bright
    Posted March 6, 2009 at 9:02 pm | Permalink

    A Firefox support responder told me to try this page to fix Firefox’s constant crashing. My Command Prompt (running Vista) says “bcdedit” is not a valid command, or something. ????

    • Posted March 6, 2009 at 9:50 pm | Permalink

      Try to disable DEP using the first method and then later turn it off completely with command prompt if it still doesn’t fix your Firefox problem.

      And for the problem of bcdedit command being invalid, make sure you are running the Command Prompt in Admin mode and also make sure you have entered the complete code correctly.

  2. riverrat373
    Posted March 16, 2009 at 10:55 pm | Permalink

    Why won’t Mozzila fix this problem??????????????????

  3. christine
    Posted March 27, 2009 at 10:18 pm | Permalink

    Hi, I tried your methods to delete DEP because it keeps shutting down internet explorer on me and it is causing alot of problems, but when I type the command in the com. prompt screen it says that “the data is not valid as specified”. What am I doing wrong? Please advise asap.

    Thank you,
    christine

  4. Peter
    Posted April 5, 2009 at 12:43 am | Permalink

    Thank you very much! The second method worked perfectly for me. Before, I didn’t have any problems with Firefox, but after installing I think version 3.0.8, it started to give random crashes because of a BEX error from DEP. The first method doesn’t work for me because it says that Firefox requires that DEP is on, so I did the second method instead. Thanks again!

    Oh, and you may want to note that you have to restart your computer for the second method to work.

    • Posted April 5, 2009 at 1:08 am | Permalink

      Glad to know that it helped :D

      • Peter
        Posted May 4, 2009 at 3:41 am | Permalink

        I installed X-Men Wolverine: Origins and im still having the APPCRASH problem, even using the bcdedit method!!

  5. Meichelle
    Posted April 18, 2009 at 8:50 pm | Permalink

    I am trying to print coupons, I have tried everything and it keeps shutting down firefox. Help?

  6. Meichelle
    Posted April 18, 2009 at 8:58 pm | Permalink

    I restarted, I did everything. I can’t find which executable file is causing the crash, (I am trying to print coupons off of a coupon site.) I can’t figure out what to do.

  7. ehculef
    Posted June 23, 2009 at 1:17 pm | Permalink

    i still have the problem on how to disable the data execution prevention..what is the other remedy?

  8. Herrozerro
    Posted August 9, 2009 at 6:09 am | Permalink

    Help! I tried the alternitive method and my Vista wont boot! I get a blue screen everytime!

  9. Yvonne Raines
    Posted August 20, 2009 at 5:53 am | Permalink

    I tried both and am still having this problem.

  10. daljit
    Posted September 18, 2009 at 12:37 pm | Permalink

    help! some type of virus ,attack on my system and DEP block my window xp2

  11. MM
    Posted January 5, 2010 at 12:12 am | Permalink

    Does anyone know what the cons of disabling DEP are? MS dont explain it in plain english enought for me>? anyhelp would be v appreciated. ty

  12. :(
    Posted January 13, 2010 at 4:14 am | Permalink

    I am having this same problem too now…. I wish I never used this 2nd method!
    After a lot of digging, read this
    http://www.tech-forums.net/pc/f9/unknown-blue-s...

One Trackback

  1. By NR2003 Windows 7 - Sim Racing Design on December 26, 2009 at 8:33 am

    [...] What Is Data Execution Prevention(DEP) And How To Disable It In Windows 7 / Vista This process should work for Win7. I ran into this problem as well when I upgraded to Win7 and [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


More in Windows (5 of 5 articles)