ServiceInstaller.DisplayName 属性
定义
指示向用户标识服务的友好名称。Indicates the friendly name that identifies the service to the user.
public:
property System::String ^ DisplayName { System::String ^ get(); void set(System::String ^ value); };
public string DisplayName { get; set; }
[System.ServiceProcess.ServiceProcessDescription("ServiceInstallerDisplayName")]
public string DisplayName { get; set; }
member this.DisplayName : string with get, set
[<System.ServiceProcess.ServiceProcessDescription("ServiceInstallerDisplayName")>]
member this.DisplayName : string with get, set
Public Property DisplayName As String
属性值
与服务关联的名称,常用于交互工具。The name associated with the service, used frequently for interactive tools.
- 属性
注解
DisplayName例如,在服务控制管理器中,用于为服务提供用户可读的描述性名称。The DisplayName is used, for example, in the Service Control Manager to provide a user-readable descriptive name for the service. DisplayName是注册表值,但从不用作注册表项。The DisplayName is a registry value, but is never used as a registry key. 因此,对属性值的限制不适 ServiceName 用于。Therefore, restrictions on the ServiceName property value do not apply. ServiceName用作 HKEY_LOCAL_MACHINES \System\CurrentControlSet\Services 注册表项,因此受到限制。ServiceName is used as the HKEY_LOCAL_MACHINES\System\CurrentControlSet\Services registry key, so it is restricted.
显示名称永远不会由安装实用工具用来标识服务,因此,对该属性的选择没有任何限制 ServiceName 。The display name is never used by the install utility to identify the service, so there are no restrictions on the choice of name, as there is for the ServiceName property.