Set oIE = CreateObject("InternetExplorer.Application")
oIE.Navigate "about:blank"
oIE.ToolBar = 0
oIE.StatusBar = 0
oIE.Width = 670
oIE.Height = 500
oIE.Left = 0
oIE.Top = 0
oIE.Visible = 1
Do While (oIE.Busy)
WScript.Sleep(100)
Loop
Set oDocument = oIE.Document
oDocument.Open
oDocument.Writeln "
Running Services List"
oDocument.Writeln ""
oDocument.Writeln "Service : State
"
Set oWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set cServices = oWMI.ExecQuery("SELECT * FROM Win32_Service")
For Each oService in cServices
If oService.State = "Running" Then
oDocument.Writeln oService.DisplayName & " : " & oService.State & "
"
Else
oDocument.Writeln oService.DisplayName & " : " & oService.State & "
"
End If
Next
oDocument.Writeln ""
oDocument.Write()
oDocument.Close