I need to add a program to the DEP
exception list through code.
One way is to add it to the Registry, but I would prefer to do it some other way if possible.
Alternatively, launching the process with DEP disabled would be okay as well, but I haven't figured out how that's possible. Using CreateRemoteThread
to call SetProcessDEPPolicy
immediately after the program launches is already too late, since DEP
is set upon process creation.