Gets or sets the description for the service.
Assembly: System.ServiceProcess (in System.ServiceProcess.dll)
Use the property to describe the purpose of the installed service to the user. The user can view the service description in applications that display details for installed services.
For example, using Windows XP, you can view the service description with the Service Control command-line utility (Sc.exe) or you can view the service description within the Services node of the Computer Management console.
The following code example sets the installation properties for a new Windows service application. The example sets the service name, along with the display name and description. After assigning the installation properties for the service, the example adds the ServiceInstaller object to the Installers collection.
simpleServiceProcessInstaller = new ServiceProcessInstaller(); simpleServiceInstaller = new ServiceInstaller(); // Set the account properties for the service process. simpleServiceProcessInstaller.Account = ServiceAccount.LocalService; // Set the installation properties for the service. // The ServiceInstaller.ServiceName must match the // ServiceBase.ServiceName set in the service // implementation that is installed by this installer. simpleServiceInstaller.ServiceName = "SimpleService"; simpleServiceInstaller.DisplayName = "Simple Service"; simpleServiceInstaller.Description = "A simple service that runs on the local computer."; simpleServiceInstaller.StartType = ServiceStartMode.Manual; // Add the installers to the Installer collection. Installers.Add(simpleServiceInstaller); Installers.Add(simpleServiceProcessInstaller);
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.