0

Is there a way to get the privileges associated with a C# program? If yes, how?

I know that in C, you have to create a token and make use of the GetTokenInformation() method to get information about the token.

Is there something similar in C#?

Charles
  • 50,943
  • 13
  • 104
  • 142
Matthew
  • 4,477
  • 21
  • 70
  • 93

1 Answers1

0

My C# is a little rusty, but if i remember correctly this does the trick

WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();
Riaan Walters
  • 2,587
  • 2
  • 18
  • 30