DEP - Turn On or Off for Programs

ByLine
How To Turn DEP On or Off for a Program in Vista and Windows 7
Synopsis
This will show you how to turn DEP (Data Execution Prevention) on or off for a specified program.
How To Turn DEP On or Off for a Program in Vista and Windows 7

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 you choose to protect all programs, you can still turn off DEP for individual programs if you know that they are safe. If a program does not run correctly when DEP is turned on, check for a DEP compatible version of the program or an update from the software publisher before you change any DEP settings.
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.


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 UAC (User Account Control). It asks you for permission first for anything that wants to run with full access to the computer.






Here's How:
NOTE:
64 bit programs will always have DEP turned on. You cannot change this.
1. Open the Control Panel. (Classic View)​
A) Click on the System icon.​
B) Go to step 3.​

OR
2. Open the Start menu.​
A) Right click on Computer and click Properties.​

3. Click on Advanced system settings.(in upper left green area)​
4. Click on the Continue button in the UAC prompt.​
5. Click on the Settings button under Performance section. (See screenshot below)​
Properties.jpg

6. Click on the Data Execution Prevention tab. (See screenshot below)​
7. Turn DEP On for Essential Windows Programs and Services Only
NOTE: This turns on DEP for only the 32 bit system programs and services. This is the default setting.
A) Dot Turn on DEP for essential Windows programs and services only.​
B) Go to step 9.​

8. Turn DEP On for All Programs and Services Except for the Ones you Select
NOTE: This turns on DEP for every 32 bit program except for the ones that you add to the list. The listed program will have DEP turned off for it.
A) Dot Turn on DEP for all programs and services except those I select.​
B) Click Add to add the programs (32 bit) that you do not want to use the DEP feature.​
Options.jpg

C) Navigate to the program's .exe file that you want to add to the DEP exclusion list and select it, then click on Open.​
Browse.jpg


9. Click on OK to apply. (See screenshot below step 8B)​
10. Restart the computer to apply changes.​
That's it,
Shawn


 
Last edited by a moderator:
Shawn Brink

Comments

DEP - Enable or Disable

I know this is a pretty big bump. However I came across this post from searching on Google about Disabling DEP temporarily. I have a old game that seemed to get blocked by DEP all the time.

I tried what you said with CMD and I disabled it. it said Success. I rebooted. And it worked. However the app was unstable and too time consuming so I uninstalled it.
So I did the same thing with the CMD.exe. But used the "alwaysOn" approach and it said Success. But now my DEP settings are still greyed out.

I'm using Vista x86 Ultimate. It's completely up to date.
I'm using AVG Anti-Virus as well.

System Restore didn't do the trick either. Any Ideas? Thanks.
 
Re: DEP (Data Execution Prevention)

If your DEP option is disabled (greyed out) in IE Settings, you haven't opened IE in "Administrator mode". Note that the DEP option is not listed in IE Settings if you are specifically running the Internet Explorer 64-bit version listed in Start | Programs.

Even if your User Account is an Administrator, Vista runs every program as a "normal/non-admin user" for additional security. I'm pretty sure that this additional security measure is independent of the User Account Control (UAC) setting that you use. I don't believe that there is anyway to diable this security feature. The only way (TMK) to specifically run a Program in "Administrator mode" is to right-click the icon or executable and select "Run as administrator". If you create a shortcut to a program and you always want to run the program in "administrator-mode" you can enable this by right-clicking the shortcut | Properties | Shortcut Tab | Advanced Button and click "Run as Administrator".

So, to disable DEP in IE, you must right-click the IE icon and select "Run as administrator".

*** Note that when you are installing programs you should always run the Setup or Install program in administrator-mode ***

HTH!
 
Re: DEP (Data Execution Prevention)

Hi dblack,

Welcome to the forum. :party:

Thank you for adding this information for the tutorial on IE7. The tutorial has been updated to include this.

Shawn :geek:
 
Re: DEP (Data Execution Prevention)

I know this is a pretty big bump. However I came across this post from searching on Google about Disabling DEP temporarily. I have a old game that seemed to get blocked by DEP all the time.

I tried what you said with CMD and I disabled it. it said Success. I rebooted. And it worked. However the app was unstable and too time consuming so I uninstalled it.
So I did the same thing with the CMD.exe. But used the "alwaysOn" approach and it said Success. But now my DEP settings are still greyed out.

I'm using Vista x86 Ultimate. It's completely up to date.
I'm using AVG Anti-Virus as well.

System Restore didn't do the trick either. Any Ideas? Thanks.
I am suspitious of the instructions on this page. From my experience with WindowsXP I would think that the proper command to turn DEP back on would be...
bcdedit.exe /set {current} nx OptIn
Has anyone tried this command instead?
 
When i try to open the program up, it's grayed out (attached file) and even when i do it in command prompt (administrator mode) it'll say it's successful, but the program won't work. It'll still give me a DEP error message, even if i restart my PC. HELP!!!:confused:

DEP.JPG
 
that didn't work, by the way.
but thanks for help


i got it to work, after a heck of research. use:

bcdedit.exe/set nx AlwaysOff
bcdedit.exe/set nx AlwaysOn

to disable and enable DEP. I've tried it and it works, disabling and enabling.
if you've been having problems, try this.
 
Thank you for the feedback Matt. I have included the AlwaysOn as a secondary option in the tutorial.

Shawn
 
I Bee and welcome to Vista Forums.

This would be for the .exe file for the program that you would want added to the DEP exclusion list so that DEP will be disabled for that program. The exe file for the program is usually located in that program's C:\Program Files folder.

Hope this helps,
Shawn
 
Hey everyone.

I really have problem with this "program stoped working". I reinstalled my vista cause I thaught this is a problem with my old vista, but still I have problems.
I even have done everything in this post (I mean turning off the DEP) but still I get the same error.

Any help is really appreciated.
Thanks
 
Hello Houmansadr, and welcome to Vista Forums.

What is the name of the program that is getting DEP is stopping? DEP stops a program when that program tries to access resticted memory. Now this can be from a malware program, a badly written program, or a older incompatible with Vista program.

If you do not trust this program, then I would recommend uninstalling it. If you do trust it, then see if using Compatibility Mode as Run as administrator with it can help. You could also disable DEP completely, but you will not be as secured if you do.

Hope this helps,
Shawn
 
Hi Brink and thank you so much for replying.

The program is SSH Secure shell. It works fine unless I try to add a "tunnel" to the ssh profile. When I try to do that the "program stopped working" pops up. I have been hanging around for a solution for a while now, but could not find anything:cry:.
I have also tried to run as administer and also compatibility with XP.

The wired thing is that even when I completely shut down the DEP (bcdedit.exe /set {current} nx AlwaysOff), still I face the same problem. Could it be due to another issue other than DEP?:confused:

Thanks again
 
Did you restart the computer afterwards to apply the disabled DEP? If DEP stopped the program, you would have DEP included in the error message. Otherwise, it was not DEP that stopped the program.

See if using Compatibility Mode on it with Run as administrator helps.
 
I did restart the computer. I have tried this several times.

I don't get anything about DEP on the error. I only get a window which says:"SSH secure shell stopped working" and that "windows is looking for a solution".

I was directed to your tutorial after reading this post:
Program has Stopped working - Windows Vista Forums
which turns out to be the same problem with a different program. In that post they are assuming that DEP is the cause of error even though they don't get any message about DEP.

I have tried it as compatible with XP and have ran it as an admin, but still the same error.

Thanks
 
It didn't help either. I don't know what's wrong with my laptop (or maybe with Vista!), I have tried to different versions of vista and the same problem. Microsoft should provide support for XP compatible programs:mad:

BTW, thanks for the help.
 
I'm sorry Houmansadr,

It appears that program just seems to not be compatible with Vista. You might also contact SSH - Support to see if they can provide a solution for their program to work with Vista.
 
Top