You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
845 B
35 lines
845 B
'***********************************************************************
|
|
'*
|
|
'* WbemSink_OnCompleted
|
|
'*
|
|
'***********************************************************************
|
|
|
|
sub WbemSink_OnCompleted(hResult, pErrorObject, pAsyncContext)
|
|
WScript.Echo "Final status is:", hResult
|
|
end sub
|
|
|
|
'***********************************************************************
|
|
'*
|
|
'* WbemSink_OnObjectReady
|
|
'*
|
|
'***********************************************************************
|
|
|
|
sub WbemSink_OnObjectReady(pObject, pAsyncContext)
|
|
Set pObject = Nothing
|
|
end sub
|
|
|
|
|
|
Dim Service
|
|
Dim MyObect
|
|
|
|
Set MySink = Wscript.CreateObject ("Wbemscripting.SWbemSink", "WbemSink_")
|
|
Set Service = GetObject ("Winmgmts:")
|
|
|
|
for i = 1 to 1000
|
|
Service.GetAsync MySink, "win32_Service"
|
|
next
|
|
|
|
while true
|
|
Service.Get "Win32_Service"
|
|
wend
|
|
|