This documentation is archived and is not being maintained.

ServiceInstaller.Description Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the description for the service.

Namespace: System.ServiceProcess
Assembly: System.ServiceProcess (in system.serviceprocess.dll)

public string Description { get; set; }
/** @property */
public String get_Description ()

/** @property */
public void set_Description (String value)

public function get Description () : String

public function set Description (value : String)

Property Value

The description of the service. The default is an empty string ("").

Use the Description 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.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0