Featured Resource:

line

Newsletter

Email Address:


line

Ask the Expert

Have a question for our resident expert? Email your questions to Bob or post in the Forum.

« Vista Screen Magnifier | Main | .NET Configuration 1.1 MMC Snap-in »

Disabling Data Execution Prevention (DEP)

Data Execution Prevention is a security feature that can be a bit of a pain at times. Often things will simply appear not to run at all; hopefully you will notice a bubble from the taskbar letting you know that DEP is the cause. If Vista (and actually this has been around since Windows Server 2003) sees that a process is being spawned that "could" be unwanted, DEP shuts it down. This is especially common in some application installations: if a Windows Installer setup (MSI) calls an executable in Vista, DEP could very well put a stop to it. If you are trying to run an installation or other executable being stopped by DEP, it could save you some trouble so turn it off while you attempt to give it another shot…

Run a command prompt as administrator. From the start menu, select "All Programs", then "Accessories" and right-click on the "Command Prompt" shortcut and choose "Run As Administrator". From here you can use the following command to disable Data Execution Prevention (DEP) with the following command:

bcdedit.exe /set {current} nx AlwaysOff

Keeping your command prompt open, run your setup or other process being stopped by DEP. Then, to turn it back on again, do the same and run the following:

bcdedit.exe /set {current} nx AlwaysOn

Comments

It didnt work i have windows vista so tell me what i have to do when it says {current}... It says the boot configuration data store could not be opened... please help many thanks from Harjun

I don't think your error has anything to do with Data Execution Prevention. Are you dual booting the system? The boot configuration data store dictates how Vista is to start up. Odds are there is a bit more to the error than this-- does it also say that "access is denied" or that it cannot be found? Perhaps we should take this one to the forum?

http://www.realtime-vista.com/forum/default.aspx?f=7

I have done this and the software I was having trouble installing installed without problem. Then I enabled the DEP again and now it is preventing all software from starting. I am running Vista home basic.

Wilhelm,

If DEP is stopping the install from succeeding, this is a somewhat common problem they will likely fix soon. If DEP is stopping the application from running-- I'd say you should complain to the vendor. Unless your situation is unique, they have likely heard alot about this problem and may have an unreleased patch they can ship you (or at the very least a date when they expect a proper Vista release to be made available).

Hi Everyone,

I know that this DEP issue is a major problem for a lot of people and I have been dealing with the DEP error with IE 7.0 issue all day until I finally found this site!

bcdedit.exe worked for me but to clarify, the only way I was able to make it work was to take out {current}. Be sure you are an Administrator when you do this but it solved my very annoying IE 7.0 issue! I don't intend on turning DEP back on since it seems to cause more problems than it's worth.

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

GOOD LUCK! I would uninstall VISTA if I could!

Betty

Dang...
Getting same trouble as harjun:

It says the boot configuration data store could not be opened.
Access Denied

I'm not dual booting this PC though.....

Oh figured out what the problem is!

You need to turn off User Account Control first. (Found under user settings)

no need to go that far: you can run the command prompt as an administrator (pin the Command prompt to the start menu, then right click it and choose run as administrator)

I am running Vista Home Premium. Following the above directions (minus the {current}) I successfully disabled DEP but now cannot turn it back on. I used the command prompt to turn on and got the message that the command was successful (tried both with and without the {current}), yet after restarting the computer DEP is still off. Tried many times. I'm concerned because after disabling DEP my system has crashed twice and I wonder if there is a connection

OK, it apparently did turn back on, as Adobe 8.1 shuts down again when I try to print (the problem causing me to want to disable DEP in the first place), although now I cannot make changes to the DEP settings dialog box. I, too, rue the day I purchased VISTA. I simply should have upgraded to XP professional...

Now this is a real problem--since turning DEP off and then back on with directions from this page, DEP is now on for all programs and Microsoft Word crashes when I try to print. Since using the bcdedit.exe commands, I no longer can access DEP through Advanced System Settings/Performance Settings to select programs to opt out. How can I return it to its previous sub-optimal level when only Adobe Reader was crashing???? I can live without printing pdf files, but not Word.

You need to include {current} in the command. Run it from an elevated command prompt.

If you run just bcdedit.exe you will see all the current settings. DEP is identified here by "nx" under "Windows Boot Loader".

bcdedit.exe /set {current} nx AlwaysOn

I'm personally leaving mine off, it has been just too much trouble!

Okay Beth, I see what is going on. If you have DEP set to AlwaysOn or AlwaysOff, the dialog you would use to include or exclude processes does not apply and so it is disabled. Set it to OptIn or OptOut the dialog will again have purpsose:

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

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.

I have a HP Laptop and after installing VISTA, DEP kept closing Windows VideoMaker when I tried to burn a DVD! HP told me to use the text above with {current} in it and it didn't work; I searched and found this site and the answer was here; THANKS!

bcdedit.exe/set nx AlwaysOff

That worked fine! After almost two months of searching!

Joe

i successfully turned off the DEP, but i still cannot run my .msp file.

can anyone help? i am running vista business.

thanks, anna

Anna,

I'm not sure exactly what it is you are trying to do, but applying a Windows Installer setup patch should definitely not require that you disable DEP. You may need to run it as administrator. Please post the details of your situation in the forum and I'll be happy to help.

http://www.realtime-vista.com/forum/default.aspx?f=7

Hi people.
Here is my situation:
Due to DEP i could not make VOIP calls off my PC as it shut the program down everytime i tried to make a call. I decided to put it in that DEP safe program list. It worked. Next time i came around trying to make a call, it stopped working and my voip client was still in the safe list. So i decided to disable it. I did it the way as shown above and it just made it worse. Now my other programs are being blocked by DEP. Doing this made me unable to use the DEP settings window. I decided to re-enable it via command prompt admin. It says it is sucessful but i still have the same problem as it being disabled. I was just wondering if there was a away of defaulting my settings without system restore. Perhaps, recovering the file (bcdedit.exe) off my original Vista disk.
Thanx

I used the command to disable the DEP settings totally. bcdedit.exe shows that it is off. However, I now have IE7, MSWord2003, and some program installers that will not work due to DEP shutting it down or now BEX messages. I decided to turn DEP back on and confirmed that it was on but same results. When I look in at DEP through Advanced System Settings/Performance Settings, it is totally greyed out...no choices either way.

Any ideas?

Hi, I've been trying to run this game but DEP wont let me. I'd start it up, hit the black screen but then DEP shuts it down. I first tried setting the program as an "exception" but it woudnlt' even allow me to do that. So i tried the command prompt. with and without the {current} and it says i've done it successfully yet when i run the game the same thing happens. And yes i did do run as administrator. I really hope someone knows whats wrong.

Ooohh. I seem to have found the problem. All i needed to do was restart my computer. silly me. Oh well thanks for the help thought if you didn't inform me about the command promp I'd have never known. Thanks for the help and newly acquired knowledge.

Raj,

I too ran into problems blocking only what was giving me trouble and resorted to turning it off like this entirely. Off, it can no longer present problems so I'm a bit confused as to why you think turning this off could have made your situation worse. At any rate, it sounds like System Restore is going to be your best bet.

If the settings in System > Advanced > Performance Options > Data Execution Prevention are disabled, that would indicate is is off (you cannot edit settings for it when it is off). Keep in mind that a reboot is required when turning it off/on.

i am trying to use a easy transfer cable i go thru all the steps that is required when turning off DEP in the system32 and i find the exe file an it still tells me i cannot turn DEP off I SAYS THAT THIS PROGRAM MUST RUN WITH THIS ON

Ok i wish i had'nt started on this but my comp is screwed since i did. First thing i done was the switch it to alwayson. Then rebooted which caused firefox or ie7 to no longer work.

windows help said to go to system settings blah blah. No options were highlighted so that screwed that idea.

back into command prompt via right click>admin.

entrered always off option and yeah it said it was successful but after rebooting again. No change what so ever.

managed to get Fire fox to boot after creating a new user account but ie7 is a big fat no.

im sick of hearing the same solutions but none of these things work.

am i really screwed or is this beatable???

- I'm trying to launch remote desktop connection on a laptop running Windows vista Ultimate.

- I get the error: "The remote desktop connection has stopped working ..."

-and from the Windows [help and support] icon, it says:
"To help protect you computer, DEP has closed the remote desktop connection."

I successfully turned off DEP, it seems, using the command:

bcdedit.exe/set nx AlwaysOff
... the operation completed successfully

: restart computer: check System properties/Advanced System Settings/Performance Settings>DEP settings - all options / settings are greyed out.


But I still get the same error:
"The remote desktop connection has stopped working ..."
"To help protect you computer, DEP has closed the remote desktop connection."

help!


I'm helping out someone run [Remote Desktop Connection] on Windows Vista Ultimate

getting error: Error: "The remote desktop connection has stopped working"

From windows help and support icon:
"To help protect you computer, DEP has closed remote desktop connection."

so we did this:
Right click on command prompt from start>programs>accessories, select : run as administrator
type:
bcdedit.exe/set nx AlwaysOff
... the operation completed successfully

and :
: restart computer: check System properties/Advanced System Settings/Performance >Settings>Data Execution Prevention settings - all options / settings are greyed out.- DEP disabled (i guess)

but then:
We still got the same error running remote desktop connection

so we tried turning it back on

bcdedit.exe/set nx AlwaysOn
..."the operation completed successfully"

but then the options under System properties/Advanced System Settings/Performance >Settings>Data Execution Prevention
were still greyed out,

and then the problem started with launching IE as well:
"To help protect you computer, DEP has closed Internet Explorer."

We're now NOT able to launch IE anymore / cannot get online

But this fixed those 2 issues

bcdedit.exe /set nx OptOut

- those options are not greyed out anymore ^_^
- We could launch IE and browse again ^_^
- we could even get to the Remote Desktop Connection screen (asking for computer name ) where as before all this started, that window couldn't load because of DEP

But when the guy typed in his computer name, it eventually came to the same error:

"To help protect you computer, DEP has closed remote desktop connection."

We then went to System properties > Advanced settings >Performance Settings> Data
Execution Prevention >

and tried to add mstsc.exe (located in c:\windows\system32) under allowed programs but it came up with the message
" This program must run with DEP enabled"

k'sooooo!

Issue fixed!

Windows Vista Ultimate

Remote Desktop Connection

DEP closing the program



My friend helped out the guy by un-installing programs that did not come pre-installed on the computer.

The guy was able to connect to remote desktop without any problems

While uninstalling programs that did not come with your computer will rarely be a solution many would be happy with, I'm glad you got your problem worked out. As applications are placed back on the computer, watch for the trouble to reappear so you know which is causing the issue. At least then you'll have an application to focus on!

Post a comment

(All comments are approved by site leader before appearing here. Thanks for commenting!)

Library Resources

line
line

Bob Kelly's Bio:

Bob Kelly is the founder of AppDeploy.com — a resource focused on desktop management products and practices. He is author of the Start to Finish Guide to Scripting with KiXtart and The Definitive Guide to Windows Desktop Administration. He is also president and co-founder of iTripoli, Inc. who provide AdminScriptEditor.com, home to an integrated suite of scripting tools and a shared library of scripts and language help. Not enough? For more on Bob click here.