1
vote
WMI Tasks using Delphi – Services
The Road to Delphi
– How do I determine which services are running and which ones are not? Use the Win32_Service class to check the state of all of the services. The state property lets you know if a service is stopped or running. const wbemFlagForwardOnly = $00000020; var FSWbemLocator : OLEVariant; FWMIService : OLEVariant; FWbemObjectSet: OLEVariant; FWbemObject : OLEVariant; oEnum : IEnumvariant; iValue : LongWord; begin; FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); FWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', ''); ...
Statistics
|
Visits by Source |
User Actions |



