Use a elevated command prompt or it won't work. Or just disable the UAC.
See below, the answer is here:
One possible choice is to turn on DEP support unconditionally:
bcdedit /set {current} nx AlwaysOn
In this mode, the DEP support options GUI is disabled and no exceptions can be defined. Any DisableNX compatibility options will also be ignored.
The opposite is to turn off DEP support completely:
bcdedit /set {current} nx AlwaysOff
With this setting in effect, the DEP support options GUI will be disabled as well as with the first option. To return to one of the GUI switchable modes, use:
bcdedit /set {current} nx OptIn
For the workstation default, which enables DEP support for Windows essential programs and services, or:
bcdedit /set {current} nx OptOut
For the server default, enabling DEP support for all executable files. The Windows machine must be rebooted each time for the bcdedit command to take effect. The output of the command:
bcdedit /enum
This will tell you the current status of DEP.