Specifies a service's security context, which defines its logon type.
Assembly: System.ServiceProcess (in System.ServiceProcess.dll)
|An account that acts as a non-privileged user on the local computer, and presents anonymous credentials to any remote server.|
|An account, used by the service control manager, that has extensive privileges on the local computer and acts as the computer on the network.|
|An account that provides extensive local privileges, and presents the computer's credentials to any remote server.|
|An account defined by a specific user on the network. Specifying User for the ServiceProcessInstaller.Account member causes the system to prompt for a valid user name and password when the service is installed, unless you set values for both the Username and Password properties of your ServiceProcessInstaller instance.|
Use the enumeration when you initialize a ServiceProcessInstaller to specify the security context of the service you are installing. The security context indicates the privileges a service has on the system and how the services act on the network (for example, whether the service presents the computer's credentials or anonymous credentials to remote servers). The enumeration provides a range of privileges so that you can specify exactly the privileges you need for any particular service.
The LocalSystem value defines a highly privileged account, but most services do not require such an elevated privilege level. The LocalService and NetworkService enumeration members provide a lower privilege level for the security context.
The values LocalService and NetworkService are available only on Windows XP and Windows Server 2003 family.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.