How to configure the Windows Data Execution Prevention (DEP) feature

How to configure the Windows Data Execution Prevention (DEP) feature

Data Execution Prevention (DEP) is a feature that has been introduced with Microsoft Windows XP SP2, Windows Server 2003, Windows Vista and newer versions of the Windows operating systems. This feature performs additional checks on memory to help prevent malicious code from running on Windows platforms. However DEP may in some cases interfere with the proper operation of software including LoadRunner components. If unusual behavior is observed when recording scripts, running load tests or analysing data then it may be necessary to modify the DEP configuration to continue working.


To modify the Windows XP or Windows Server 2003 DEP configuration, follow these steps:

1. Open Start > Control Panel > System.

2. In the Advanced tab, click Performance settings.

3. In the Performance Options Data Execution Prevention tab, select

The first option, DEP for essential services only.

5. Click OK to save the settings.

6. Reboot the machine.

To disable DEP completely in Windows XP or Windows Server 2003, follow these steps:

1. Click Start, and then click Control Panel.

2. Under Pick a category, click Performance and Maintenance (If the System is not available directly under control panel).

3. Under or Pick a Control Panel icon, click System.

4. Click the Advanced tab, and in the Startup and Recovery area, click Settings.

5. In the System startup area, click Edit.

6. In Notepad, click Edit and then click Find.

7. In the Find what field, type /noexecute and then click Find Next.

READ  Software Testing Artifacts - Detailed Guide

8. In the Find dialog box click Cancel.

9. Replace the policy_level (for example, “OptIn” default) with “AlwaysOff” (without the quotes).

WARNING: Be sure to enter the text carefully. Your boot.ini file switch should now read:


10. In Notepad, click File and then click Save.

11. Click OK to close Startup and Recovery.

12. Click OK to close System Properties and then restart your computer.

If the DEP options are greyed out then it means that DEP is completely disabled.

To enable or disable DEP in Windows Vista, follow these steps:

1. Open a Elevated Command Prompt

i. Open the Start Menu

ii. Click All Programs and Accessories

iii. Right click on Command Pront and click Run as Administrator

iv. Click on Continue

2. To Disable DEP

i. In the Elevated Command Prompt, type:

bcdedit.exe /set {current} nx AlwaysOff

ii. Restart the computer to apply

3. To Enable DEP

i. In the Elevated Command Prompt, type:

bcdedit.exe /set {current} nx OptIn

ii. Restart the computer to apply

DEP Options:


DEP is disabled for all processes.


DEP is enabled for all processes.


DEP is enabled for only Windows system components and services that have DEP applied. This is the default setting.


This setting does not provide any DEP coverage for any part of the system, regardless of hardware DEP support.

1 thought on “How to configure the Windows Data Execution Prevention (DEP) feature”

  1. Useless greyed out option to enable it !!! Windows do do things nasty way behind users back against knowledge of user and against user will !!!!!!!!!!!!! Damn MS !!! The only solution FORMAT AND SETUP AGAIN !!!! That’s the only cure for crap win os for all problems not only for that ones !!! We should charge MS for no need job wasted time and electricity !!!!!


Leave a Comment