System.ServiceProcess Indicates the system's power status. Battery power is low. An Advanced Power Management (APM) BIOS signaled an APM OEM event. A change in the power status of the computer is detected, such as a switch from battery power to A/C. The system also broadcasts this event when remaining battery power slips below the threshold specified by the user or if the battery power changes by a specified percentage. The system has requested permission to suspend the computer. An application that grants permission should carry out preparations for the suspension before returning. The system was denied permission to suspend the computer. This status is broadcast if any application or driver denied a previous QuerySuspend status. The computer has woken up automatically to handle an event. The system has resumed operation after a critical suspension caused by a failing battery. The system has resumed operation after being suspended. The computer is about to enter a suspended state. This event is typically broadcast when all applications and installable drivers have returned true to a previous QuerySuspend state. Specifies a service's security context, which defines its logon type. An account that acts as a non-privileged user on the local computer, and presents anonymous credentials to any remote server. An account that provides extensive local privileges, and presents the computer's 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 defined by a specific user on the network. Specifying User for the 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 and properties of your instance. Provides a base class for a service that will exist as part of a service application. must be derived from when creating a new service class. Creates a new instance of the class. Indicates whether to report Start, Stop, Pause, and Continue commands in the event log. true to report information in the event log; otherwise, false. Gets or sets a value indicating whether the service can handle notifications of computer power status changes. true if the service handles the computer power status changes indicated in the class, otherwise, false. This property is modified after the service was started. Gets or sets a value that indicates whether the service can handle session change events received from a Terminal Server session. true if the service can handle Terminal Server session change events; otherwise, false. This property is modified after the service was started. Gets or sets a value indicating whether the service can be paused and resumed. true if the service can be paused; otherwise, false. The service has already been started. The property cannot be changed once the service has started. Gets or sets a value indicating whether the service should be notified when the system is shutting down. true if the service should be notified when the system is shutting down; otherwise, false. The service has already been started. The property cannot be changed once the service has started. Gets or sets a value indicating whether the service can be stopped once it has started. true if the service can be stopped and the method called; otherwise, false. The service has already been started. The property cannot be changed once the service has started. Disposes of the resources (other than memory) used by the . true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets an event log you can use to write notification of service command calls, such as Start and Stop, to the Application event log. An instance whose source is registered to the Application log. Gets or sets the exit code for the service. The exit code for the service. Indicates the maximum size for a service name. When implemented in a derived class, runs when a Continue command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service resumes normal functioning after being paused. When implemented in a derived class, executes when the Service Control Manager (SCM) passes a custom command to the service. Specifies actions to take when a command with the specified parameter value occurs. The command message sent to the service. When implemented in a derived class, executes when a Pause command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service pauses. When implemented in a derived class, executes when the computer's power status has changed. This applies to laptop computers when they go into suspended mode, which is not the same as a system shutdown. When implemented in a derived class, the needs of your application determine what value to return. For example, if a QuerySuspend broadcast status is passed, you could cause your application to reject the query by returning false. A that indicates a notification from the system about its power status. Executes when a change event is received from a Terminal Server session. A structure that identifies the change type. When implemented in a derived class, executes when the system is shutting down. Specifies what should occur immediately prior to the system shutting down. When implemented in a derived class, executes when a Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts. Data passed by the start command. When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running. Requests additional time for a pending operation. The requested time in milliseconds. The service is not in a pending state. Registers the executable for a service with the Service Control Manager (SCM). A which indicates a service to start. is null. Registers the executable for multiple services with the Service Control Manager (SCM). An array of ServiceBase instances, which indicate services to start. You did not supply a service to start. The array might be null or empty. Gets the service control handle for the service. An structure that contains the service control handle for the service. Registers the command handler and starts the service. The number of arguments in the argument array. An structure that points to an array of arguments. Gets or sets the short name used to identify the service to the system. The name of the service. The service has already been started. The property cannot be changed once the service has started. The property is invalid. Stops the executing service. Represents a Windows service and allows you to connect to a running or stopped service, manipulate it, or get information about it. Initializes a new instance of the class that is not associated with a specific service. Initializes a new instance of the class that is associated with an existing service on the local computer. The name that identifies the service to the system. This can also be the display name for the service. is invalid. Initializes a new instance of the class that is associated with an existing service on the specified computer. The name that identifies the service to the system. This can also be the display name for the service.. The computer on which the service resides. is invalid.-or- is invalid. Gets a value indicating whether the service can be paused and resumed. true if the service can be paused; otherwise, false. An error occurred when accessing a system API. The service was not found. Gets a value indicating whether the service should be notified when the system is shutting down. true if the service should be notified when the system is shutting down; otherwise, false. An error occurred when accessing a system API. The service was not found. Gets a value indicating whether the service can be stopped after it has started. true if the service can be stopped and the method called; otherwise, false. An error occurred when accessing a system API. The service was not found. Disconnects this instance from the service and frees all the resources that the instance allocated. Continues a service after it has been paused. An error occurred when accessing a system API. The service was not found. Gets the set of services that depends on the service associated with this instance. An array of instances, each of which is associated with a service that depends on this service. An error occurred when accessing a system API. The service was not found. Gets or sets a friendly name for the service. The friendly name of the service, which can be used to identify the service. The is null. An error occurred when accessing a system API. The service was not found. Releases the unmanaged resources used by the and optionally releases the managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Executes a custom command on the service. An application-defined command flag that indicates which custom command to execute. The value must be equal to or larger than 128, and equal to or less than 256. An error occurred when accessing a system API. The service was not found. Retrieves the device driver services on the local computer. An array of type in which each element is associated with a device driver service on the local computer. An error occurred when accessing a system API. Retrieves the device driver services on the specified computer. An array of type in which each element is associated with a device driver service on the specified computer. The computer from which to retrieve the device driver services. An error occurred when accessing a system API. The parameter has invalid syntax. Retrieves all the services on the local computer, except for the device driver services. An array of type in which each element is associated with a service on the local computer. An error occurred when accessing a system API. Retrieves all the services on the specified computer, except for the device driver services. An array of type in which each element is associated with a service on the specified computer. The computer from which to retrieve the services. An error occurred when accessing a system API. The parameter has invalid syntax. Gets or sets the name of the computer on which this service resides. The name of the computer that is running the service associated with this instance. The default is the local computer ("."). The syntax is invalid. Suspends a service's operation. An error occurred when accessing a system API. The service was not found. Refreshes property values by resetting the properties to their current values. Gets the handle for the service. A that contains the handle for the service. The service was not found. Gets or sets the name that identifies the service that this instance references. The name that identifies the service that this instance references. The default is an empty string (""). The is null. The syntax of the property is invalid. The service was not found. The set of services that this service depends on. An array of instances, each of which is associated with a service that must be running for this service to run. An error occurred when accessing a system API. The service was not found. Gets the type of service that this object references. One of the values, used to indicate the network service type. An error occurred when accessing a system API. The service was not found. Starts the service, passing no arguments. An error occurred when accessing a system API. The service was not found. Starts a service, passing the specified arguments. An array of arguments to pass to the service when it starts. An error occurred when accessing a system API. The service cannot be started. is null.-or-A member of the array is null. Gets the status of the service that is referenced by this instance. One of the values that indicates whether the service is running, stopped, or paused, or whether a start, stop, pause, or continue command is pending. An error occurred when accessing a system API. The service was not found. Stops this service and any services that are dependent on this service. An error occurred when accessing a system API. The service was not found. Infinitely waits for the service to reach the specified status. The status to wait for. The parameter is not any of the values defined in the enumeration. Waits for the service to reach the specified status or for the specified time-out to expire. The status to wait for. A object specifying the amount of time to wait for the service to reach the specified status. The parameter is not any of the values defined in the enumeration. The value specified for the parameter expires. Allows control of code access security permissions for service controllers. Initializes a new instance of the class. Initializes a new instance of the class with the specified access to resources. One of the values. The parameter is not a valid value of . Initializes a new instance of the class with the specified permission access levels, the name of the computer on which the service resides, and the short name that identifies the service to the system. One of the values. The name of the computer on which the service resides. The short name that identifies the service to the system. Initializes a new instance of the class with the specified permission entries. An array of objects. The property is set to this value. is null. Gets the collection of permission entries for this permissions request. A that contains the permission entries for this permissions request. Defines access levels used by permission classes. The has no permissions. The can connect to, but not control, existing services. The can connect to and control existing services. Allows declarative service controller permission checks. Initializes a new instance of the class. One of the values. Creates the permission based on the requested access levels that are set through the property on the attribute. An that represents the created permission. Gets or sets the name of the computer on which the service resides. The name of the computer that is running the service associated with the . The syntax is invalid. Gets or sets the access levels used in the permissions request. A bitwise combination of the values. Gets or sets the short name that identifies the service to the system. The name of the service. The is null. The syntax of the property is invalid. Defines the smallest unit of a code access security permission that is set for a . Initializes a new instance of the class. Initializes a new instance of the class with the specified permission access levels, the name of the computer, and a short name that identifies the service. One of the values. The name of the computer on which the service resides. The short name that identifies the service to the system. is null. is not valid.-or-is not valid. Gets the name of the computer on which the service resides. The name of the computer that is running the service associated with the . Gets the access levels used in the permissions request. A bitwise combination of the values. Gets the short name that identifies the service to the system. The name of the service. Contains a strongly-typed collection of objects. Adds a specified to this collection. The zero-based index of the added object. The object to add. Appends a set of specified permission entries to this collection. An array of type objects that contains the permission entries to add. is null. Appends a set of specified permission entries to this collection. A that contains the permission entries to add. is null. Determines whether this collection contains a specified object. true if the specified object belongs to this collection; otherwise, false. The object to find. Copies the permission entries from this collection to an array, starting at a particular index of the array. An array of type that receives the copied permission entries. The zero-based index at which to begin copying the permission entries. Determines the index of a specified permission entry in this collection. The zero-based index of the specified permission entry, or -1 if the permission entry was not found in the collection. The permission entry to search for. Inserts a permission entry into this collection at a specified index. The zero-based index of the collection at which to insert the permission entry. The permission entry to insert into this collection. Gets or sets the object at a specified index. The object that exists at the specified index. The zero-based index into the collection. Performs additional custom processes after clearing the contents of the collection. Performs additional custom processes before a new permission entry is inserted into the collection. The zero-based index at which to insert . The new value of the permission entry at . Performs additional custom processes when removing a new permission entry from the collection. The zero-based index at which can be found. The permission entry to remove from . Performs additional custom processes before setting a value in the collection. The zero-based index at which can be found. The value to replace with . The new value of the permission entry at . Removes a specified permission entry from this collection. The permission entry to remove. Indicates the current state of the service. The service continue is pending. This corresponds to the Win32 SERVICE_CONTINUE_PENDING constant, which is defined as 0x00000005. The service is paused. This corresponds to the Win32 SERVICE_PAUSED constant, which is defined as 0x00000007. The service pause is pending. This corresponds to the Win32 SERVICE_PAUSE_PENDING constant, which is defined as 0x00000006. The service is running. This corresponds to the Win32 SERVICE_RUNNING constant, which is defined as 0x00000004. The service is starting. This corresponds to the Win32 SERVICE_START_PENDING constant, which is defined as 0x00000002. The service is not running. This corresponds to the Win32 SERVICE_STOPPED constant, which is defined as 0x00000001. The service is stopping. This corresponds to the Win32 SERVICE_STOP_PENDING constant, which is defined as 0x00000003. Installs a class that extends to implement a service. This class is called by the install utility when installing a service application. Initializes a new instance of the class. Copies properties from an instance of to this installer. The from which to copy. The component you are associating with this installer does not inherit from . Gets or sets the description for the service. The description of the service. The default is an empty string (""). Indicates the friendly name that identifies the service to the user. The name associated with the service, used frequently for interactive tools. Installs the service by writing service application information to the registry. This method is meant to be used by installation tools, which process the appropriate methods automatically. An that contains the context information associated with the installation. The installation does not contain a for the executable.-or- The file name for the assembly is null or an empty string.-or- The service name is invalid.-or- The Service Control Manager could not be opened. The display name for the service is more than 255 characters in length. The system could not generate a handle to the service. -or-A service with that name is already installed. Indicates whether two installers would install the same service. true if calling on both of these installers would result in installing the same service; otherwise, false. A to which you are comparing the current installer. Rolls back service application information written to the registry by the installation procedure. This method is meant to be used by installation tools, which process the appropriate methods automatically. An that contains the context information associated with the installation. Indicates the name used by the system to identify this service. This property must be identical to the of the service you want to install. The name of the service to be installed. This value must be set before the install utility attempts to install the service. The property is invalid. Indicates the services that must be running for this service to run. An array of services that must be running before the service associated with this installer can run. Indicates how and when this service is started. A that represents the way the service is started. The default is Manual, which specifies that the service will not automatically start after reboot. The start mode is not a value of the enumeration. Uninstalls the service by removing information about it from the registry. An that contains the context information associated with the installation. The Service Control Manager could not be opened.-or- The system could not get a handle to the service. Specifies a description for a property or event. Initializes a new instance of the class, using the specified description. The application-defined description text. Gets description text associated with the service process. An application-defined description. Installs an executable containing classes that extend . This class is called by installation utilities, such as InstallUtil.exe, when installing a service application. Creates a new instance of the class. Gets or sets the type of account under which to run this service application. A that defines the type of account under which the system runs this service. The default is User. Implements the base class method with no class-specific behavior. The that represents the service process. Gets help text displayed for service installation options. Help text that provides a description of the steps for setting the user name and password in order to run the service under a particular account. Writes service application information to the registry. This method is meant to be used by installation tools, which call the appropriate methods automatically. An that contains the context information associated with the installation. The is null. Gets or sets the password associated with the user account under which the service application runs. The password associated with the account under which the service should run. The default is an empty string (""). The property is not public, and is never serialized. Rolls back service application information written to the registry by the installation procedure. This method is meant to be used by installation tools, which process the appropriate methods automatically. An that contains the context information associated with the installation. The is null.-or- The is corrupted or non-existent. Gets or sets the user account under which the service application will run. The account under which the service should run. The default is an empty string (""). Indicates the start mode of the service. Indicates that the service is started only manually, by a user (using the Service Control Manager) or by an application. Indicates that the service is to be started (or was started) by the operating system, at system start-up. If an automatically started service depends on a manually started service, the manually started service is also started automatically at system startup. Indicates that the service is disabled, so that it cannot be started by a user or application. Represents the type of the service. A service for a hardware device that requires its own driver. A file system driver, which is also a Kernel device driver. A service that can communicate with the desktop. A Kernel device driver such as a hard disk or other low-level hardware device driver. A file system driver used during startup to determine the file systems present on the system. A Win32 program that can be started by the Service Controller and that obeys the service control protocol. This type of Win32 service runs in a process by itself. A Win32 service that can share a process with other Win32 services. Identifies the reason for a Terminal Services session change. Determines whether the specified object is equal to the current session change description. true if is equal to the current structure; otherwise, false. The object to compare to the current structure. Determines whether the specified session change description is equal to the current session change description. true if is equal to the current structure; otherwise, false. The structure to compare to the current structure. Gets a hash code for the current session change description. A hash code for the current session change description. Returns a value indicating whether two structures are equal. true if and are equal; otherwise, false. A structure. A structure. Returns a value indicating whether two structures are not equal. true if and are not equal; otherwise, false. A structure. A structure. Gets the reason for the session change. One of the values. Gets the session ID for the associated session. The session ID for the associated session. Specifies the reason for a Terminal Services session change notice. A console session has connected. A console session has disconnected. A remote session has connected. A remote session has disconnected. A user has logged on to a session. A user has logged off from a session. A session has been locked. A session has been unlocked. The remote control status of a session has changed. The exception that is thrown when a specified timeout has expired. Initializes a new instance of the class with no message text. Initializes a new instace of the class with the specified serialization information and context. The that holds the serialized object data about the exception being thrown. The that contains contextual information about the source or destination. The parameter is null. The class name is null or is zero (0). Initializes a new instance of the class with the specified message text. Text that describes the type or source of the exception. Initializes a new instance of the class with the specified message text and inner exception. Text that describes the type or source of the exception. The exception that caused the current exception. Provides a dialog box, which prompts for account information of a Windows Service application. Initializes a new instance of the service account form. Begins running a standard application message loop and displays the service account form. Gets or sets the password for the service account form. A string representing the password in the service account form. The default is an empty string (""). Gets the dialog result for the service account form. A indicating the user response to the dialog box. The default is OK. Gets or sets the user name for the service account form. A string representing the user name in the service account form. The default is an empty string (""). Specifies the return value of a form. The dialog return value is OK. This value typically indicates that the user confirmed the account properties and pressed the OK button to close the dialog. Install the service with a system account rather than a user account. This value typically indicates that the dialog was not displayed to the user. For example, the property is set to something other than User. The dialog return value is Canceled. This value typically indicates that the user canceled out of the dialog without setting the account fields.