문제

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#?

도움이 되었습니까?

해결책

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

WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top