Service Class

Published: June 20, 2005

Service Class

The Service class gets a list of the types of services (Speech Engine Services (SES), Telephony Application Services (TAS), or Speech Application Deployment Service (SADS)) on any given computer.

Set serviceclass = GetObject("winmgmts:root/MSS:Service")


References to instances of the Service class are stored in the Services property of the Deployment class.

Windows Management Instrumentation (WMI) Script Example

strDeploymentName = "Default"

' Connect to MSS namespace on the specified computer.
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objNamespace = objLocator.ConnectServer("localhost", "root/MSS")

' Get the WMI deployment object.
Set objDeployment = objNamespace.Get("Deployment.Name='" & strDeploymentName & "'")

' Display the services.
WScript.Echo "Services:" & vbCrLf

If IsArray(objDeployment.Services) Then
    For Each service In objDeployment.Services
        Set objCurrService = GetObject("winmgmts:" & service)
        WScript.Echo objCurrService.Name
        WScript.Echo objCurrService.DeploymentName
        WScript.Echo objCurrService.Type
        WScript.Echo objCurrService.AppServerUrl
End If 




Name property

Gets and sets the unique name that identifies the server where this service resides.

DeploymentName property

Gets and sets the name of the deployment that this service belongs to. (Equates to the Name property of the Deployment class.)

AppServerURL property

Gets and sets the URL for the SADS virtual directory.

Type property

Gets and sets the types of Microsoft Speech Server (MSS) services running on this computer. Valid values are: "Unknown", "SES", "TAS", "SADS".