0

Is it possible to check if Data Execution Prevention is enabled?

Is there any function that works the same as this CMD command

wmic OS Get DataExecutionPrevention_SupportPolicy

And returns something like this?

0 – DEP is disabled for all processes.
1 – DEP is enabled for all processes.
2 – DEP is enabled for only Windows system components and services. (Default)
3 – DEP is enabled for all processes.
Roman R.
  • 68,205
  • 6
  • 94
  • 158
John
  • 21
  • 4

1 Answers1

1

GetSystemDEPPolicy function:

This function returns a value of type DEP_SYSTEM_POLICY_TYPE, which can be one of the following values: AlwaysOff, AlwaysOn, OptIn, OptOut.

Roman R.
  • 68,205
  • 6
  • 94
  • 158