DEP - Enable or Disable

How to Enable or Disable DEP in Vista, Windows 7, and Windows 8
This will show you how to Enable or Disable DEP (Data Execution Prevention) in Vista, Windows 7, and Windows 8.
How to Enable or Disable DEP in Vista, Windows 7, and Windows 8

information   Information
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 (RAM) locations reserved only for Windows and other authorized programs. These types of attacks can harm your programs and files. If DEP notices a program on your computer using memory incorrectly, it closes the program and notifies you with the DEP stop error. DEP is ran in a software mode and in a hardware mode. If your processor supports DEP (NX for AMD, and XD for Intel), then you will have hardware and software DEP. If it doesn't, then Vista will just use software DEP. 64 bit applications will have DEP enabled all the time by default, but 32 bit applications do not and must have DEP manually enabled for them. For more information, see: Windows Help and Support: Data Execution Prevention: FAQs
Note   Note
If a program is being closed by DEP, then make sure that it is a DEP compatible version and check for an updated version. If it is not DEP compatible, then you can uninstall the program or turn off DEP for that particular program.
warning   Warning
Do not disable DEP, or exclude (OptOut) a program, unless you have adequate protection and are having problems only with a known safe program that DEP will not let run and you cannot live without it. Remember DEP stopped the program for a reason. Either it is just a improperly running program, or some sort of malware trying to get into restricted memory.

Adequate Protection:
  • Antivirus program with realtime scanning (EX: Avast or AVG are good ones)
  • A spyware/adware program with realtime scanning (EX: Windows Defender, Spybot Search and Destroy)
  • Enable Vista's UAC (User Account Control). It asks you for permission first for anything that wants to run with full access to the computer.
EXAMPLE: DEP Enabled and Disable
DEP is enabled by default. If you installed Enhanced Mitigation Experience Toolkit (EMET), then it will be used by Windows instead of DEP and gray out the DEP settings like below.
DEP_Enabled.jpg DEP_Disabled.jpg

To Enable or Disable DEP in Vista

NOTE: If you have a 64-bit CPU, then you may also have a no exectute option in BIOS that is the built in DEP on the CPU.
2. To Enable DEP
A) In the elevated command prompt, type in bold below and press Enter. (See screenshot below)​
NOTE: If for some reason this command does not enable DEP after restarting the computer, then use the bcdedit.exe /set {current} nx AlwaysOn command instead.​
bcdedit.exe /set {current} nx OptIn

B) You should get a success message back​
C) Close the elevated command prompt.​
D) Restart the computer to apply.​

3. To Disable DEP
A) In the command prompt, type in bold belowand press Enter. (See screenshot below)
bcdedit.exe /set {current} nx AlwaysOff

B) You should get a success message back.​
C) Close the command prompt.​
D) Restart the computer to apply.​

4. To Verify the Status of DEP
A) In the command prompt, type in bold below and press Enter. (See screenshot below table)​
wmic OS Get DataExecutionPrevention_SupportPolicy

B) You will get a number (see table below) that will tell you the status of DEP.​
C) Close command prompt when done.​
Note   Note
2 is the default setting.
Note   Note





DEP is disabled for all processes. (Step 3 above)



DEP is enabled for all processes. (Note under step 2)



DEP is enabled for only Windows system components and services have DEP applied. Default setting. (Step 2 above)



DEP is enabled for all processes. Administrators can manually create a list of specific applications which do not have DEP applied. (How to Turn DEP On or Off for a Program)


Enable or Disable DEP in Internet Explorer

NOTE: This will be for the 32 bit version of Internet Explorer.
  • For a 32 bit Vista version: C:\Program Files\Internet Explorer\iexplore.exe
  • For a 64 bit Vista version: C:\Program Files (x86)\Internet Explorer\iexplore.exe
warning   Warning
Some Active X Internet Explorer add-ons may not work with DEP on. It can cause them to crash and prevent the startup of IE by DEP closing it. If this happens to you, then see: How to Fix a Crashing Internet Explorer in Vista or disable DEP again.

1. Open the Start Menu.​
2. Click on All Programs and right click on Internet Explorer, then click Run as administrator.​
NOTE: If you cannot get IE7 to open using step 2, then click on All Programs and Accessories. Next, right click on Internet Explorer (No Add-ons) and click on Run as administrator instead.​
WARNING: If you do not use Run as administrator, the Enable memory protection to help mitigate online attacks option will be grayed out in steps 5 and 6 below, and you will not be able to enable or disable it.​
3. In Internet Explorer, click on Tools and Internet Options.​
4. Click on the Advanced tab. (See screenshot below)​
5. To Enable DEP for the 32 bit Internet Explorer
A) Under Security, check Enable memory protection to help mitigate online attacks.​
B) Go to step 7.​

6. To Disable DEP for the 32 bit Internet Explorer
A) Under Security, uncheck Enable memory protection to help mitigate online attacks.​

7. Click on OK to apply.​

That's it,

Last edited by a moderator:
Shawn Brink


Hi Brink. A few days ago I enabled Dep in IE7. No problems, I did have to deal with a couple ad-ons, no problems. IE7 runs fine now.

You'r Tutorials are great.

I ran SpyBot S&D today for the first time since DEP enable, it came up with this and I want to make sure it's the DEP value before I deal
with (or not) it!

View attachment 2981

When ever you have time for a reply. I thank you very much

Later :shock:
Last edited:
Hi Bare Foot Kid,

From the location in the registry and the name value, I would say that it is most likely from the DEP being enabled for IE7. I would not worry about it.

Hi Shawn, I enabled the DEP feature on my computer and also IE7, but there is a certain web site I go to, that I trust, that when I try to run certain features on the web site, IE7 shuts it down everytime and says it has something to do with the DEP. Is there a way I can turn DEP off for certain web sites ,I trust, similar to how you can Turn it DEP off for certain programs on the computer? Also, sometimes when I restart my computer and try to get back on the vistx64 web site it won't connect, but it will to every other site. Is the web site down sometimes or is it something on my end? I was going to ask you another question about my fans speeding up from time to time, but I think I figured that one out on my own LOL. I had my computer enclosed and I think it was getting to hot.

Thanks as always,

Shawn, your help is so valuable. i may get the hang of this after all lol. I disabled DEP for IE7, so its working just fine. I'm not sure what I did , but now when I go to like a web site such as TD Ameritrade, when I log on instead of staying on that same page, it opens up a new window. It wasn't doing that before. Here is another message I am getting.

'Internet explorer needs to open up a new window to display this webpage.'

'For your computers security, websites that are in different security zones must open in different window.'

I am not sure what I changed but it wasn't doing that before. Can you help?



If you are changing from a unsecured website (http://) to a secured one (https://), then this is normal.

Check in the Internet Options, under the Security tab, to see if you have the Default level button grayed out for each of the 4 zones. If not, press the Default level button to set the default settings for that zone.

Hope this helps,
Well I figured it out Shawn. The Internet/Protected Mode was off. I turned it on and for some reason that fixed the issues. When I log on it opens in the same page instead of pulling up a whole new internet explorer page. Also, the tabs are working again without telling me that a particular site needs to open in a different web site. Hey Shawn, should 'Navigate subframes accross different domains' be enabled or disabled?

You da' man!,

Last edited:

By default in the:

Internet Zone: Disabled
Local Intranet Zone: Enabled

I would just go with the default settings. They are pretty good.

you stated that DEP is enabled by default in IE7 64 bit. Can it be disabled?

The options you presented seem to be directed at Vista (32 & 64bit ) and IE7 32bit. It wouldn't be the first if I've misread instructions.

Thanks for taking the time to make a difference.


Sorry, DEP is native to 64 bit and cannot be disabled. I only referenced both the 32 bit and 64 bit Vista because the 64 bit Vista still uses 32 bit applications.
Hi, I have 32 bit version of Windows home premium. I have installed adobe acrobat 8 professional and the only way I can get it to scan to pdf via my 1232 Twain scanner is if I disable DEP. Is this safe for my system. I did go to Adobe site and update to the most recent version however it still will not work unless I disable DEP completly because it will not allow me to do it for the single program. Any help will be greatly appreciated.
Hi Maf4800,

Welcome to Vista x64 Forums. :party:

Adobe Acrobat Reader is a safe program to trust. It may be some conflict between the Twain driver for you scanner and the Adobe background service. As a test to just eliminate these as a possible cause, you might try doing it with UAC, antivirus program, firewall program, and any other security program that is running off and on.

Thanks for your response. I will try however I did temporality turn off dep completely and the program worked when I enable dep it stop working again.