Vote UpVote

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', '', ''); ...
Favorite? Off-Topic? Rodrigo @ 2011-11-17 03:37


Visits: 536
Votes: 1
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)