TCS
TCS

Reputation: 5900

How to check if a process has elevated privileges in windows 7 using native C++?

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

Answers (1)

Kenny Kerr
Kenny Kerr

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

Related Questions