Click or drag to resize

UserAccountControl Class

Provides facilities for enabling and disabling User Account Control (UAC), determining elevation and virtualization status, and launching a process under elevated credentials.
Inheritance Hierarchy
SystemObject
  GSF.IdentityUserAccountControl

Namespace: GSF.Identity
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
public static class UserAccountControl
View Source

The UserAccountControl type exposes the following members.

Properties
 NameDescription
Public propertyStatic memberIsCurrentProcessElevated Returns true if the current process is elevated, i.e. if the process went through an elevation consent phase.
Public propertyStatic memberIsCurrentProcessVirtualized Returns true if the current process is using UAC virtualization.
Public propertyStatic memberIsUacEnabled Returns true if User Account Control (UAC) is enabled on this machine.
Public propertyStatic memberIsUserAdmin Returns true if the current user has administrator privileges.
Top
Methods
 NameDescription
Public methodStatic memberCreateProcessAsAdmin Creates a process under the elevated token, regardless of UAC settings or the manifest associated with that process.
Public methodStatic memberCreateProcessAsStandardUser Creates a process under the standard user if the current process is elevated. The identity of the standard user is determined by retrieving the user token of the currently running Explorer (shell) process.
Public methodStatic memberDisableUac Disables User Account Control by changing the LUA registry key. The changes do not have effect until the system is restarted.
Public methodStatic memberDisableUacAndRestartWindows Disables User Account Control and restarts the system.
Public methodStatic memberEnableUac Enables User Account Control by changing the LUA registry key. The changes do not have effect until the system is restarted.
Public methodStatic memberEnableUacAndRestartWindows Enables User Account Control and restarts the system.
Top
See Also