Reference for Win32_Service
(Diese Seite wurde noch nicht auf das neue Layout umgestellt!)

Select by Class Type Search by Keyword
Show all classes

Category (Kategorie):

Processes and Services

Description (Beschreibung):

The Win32_Service WMI class represents a service on a Windows computer system. A service application conforms to the interface rules of the Service Control Manager (SCM) and can be started by a user automatically at system boot through the Services control panel utility, or by an application that uses the service functions included in the Windows API. Services can execute even when no user is logged on to the system.

Availability (Verfügbarkeit):

WMI Class NameWindows Server 2003Windows XP ProfessionalWindows 2000Windows NT 4.0Windows 98
Win32_ServiceYesYesYesYesYes

Properties (Attribute):

ItemServer 2003XP ProWindows 2000NT 4.0Windows 98
AcceptPauseYesYesYesYesYes
AcceptStopYesYesYesYesYes
CaptionYesYesYesYesYes
CheckPointYesYesYesYesYes
CreationClassNameYesYesYesYesYes
DescriptionYesYesYesYesYes
DesktopInteractYesYesYesYesYes
DisplayNameYesYesYesYesYes
ErrorControlYesYesYesYesYes
ExitCodeYesYesYesYesYes
InstallDateYesYesYesYesYes
NameYesYesYesYesYes
PathNameYesYesYesYesYes
ProcessIdYesYesYesYesYes
ServiceSpecificExitCodeYesYesYesYesYes
ServiceTypeYesYesYesYesYes
StartedYesYesYesYesYes
StartModeYesYesYesYesYes
StartNameYesYesYesYesYes
StateYesYesYesYesYes
StatusYesYesYesYesYes
SystemCreationClassNameYesYesYesYesYes
SystemNameYesYesYesYesYes
TagIdYesYesYesYesYes
WaitHintYesYesYesYesYes

Methods (Methoden):

ItemServer 2003XP ProWindows 2000NT 4.0Windows 98
ChangeYesYesYesYesYes
ChangeStartModeYesYesYesYesYes
CreateYesYesYesYesYes
DeleteYesYesYesYesYes
InterrogateServiceYesYesYesYesYes
PauseServiceYesYesYesYesYes
ResumeServiceYesYesYesYesYes
StartServiceYesYesYesYesYes
StopServiceYesYesYesYesYes
UserControlServiceYesYesYesYesYes

Sample Code (Beispiel):

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Service")
For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
Next

Links:

Link zur Original-Microsoft-Dokumentation