| UserAccountControlIsRunAsAdmin Method |
The function checks whether the current process is run as administrator.
In other words, it dictates whether the primary access token of the
process belongs to user account that is a member of the local
Administrators group and it is elevated.
Namespace: TomsToolbox.DesktopAssembly: TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax public static bool IsRunAsAdmin()
Public Shared Function IsRunAsAdmin As Boolean
Return Value
Boolean
Returns true if the primary access token of the process belongs to user
account that is a member of the local Administrators group and it is
elevated. Returns false if the token does not.
See Also