Search code examples
winapiprivileges

SeDebugPrivilege token missing


I am running my application as local user administrator, but for some strange reason SeDebugPriviledge is missing from the token list of my process.

Is there any way I can add it ? (Not enabling it because it's missing).


Solution

  • Use AdjustTokenPrivileges to enable the privilege. This example on MSDN shows you how to do so.

    Note that this will only be effective is your are running the process elevated.