Reputation: 5900
How can I check if a process has elevated privileges in Windows 7 (using native C++, not C#/C++.net) ?
I've been looking for an answer for quite sometimes, but all I can find are the answers that use the .NET framework.
Upvotes: 8
Views: 5246
Reputation: 3115
The simplest approach is to call the IsUserAnAdmin function. If you need more precision you can also use GetTokenInformation but in most cases that is overkill.
Upvotes: 8