Export (0) Print
Expand All

ServiceInstaller.Description Property

Gets or sets the description for the service.

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

[ComVisibleAttribute(false)] 
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)

Not applicable.

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.
Installers.Add(simpleServiceInstaller);
Installers.Add(simpleServiceProcessInstaller);

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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft