Leaked source code of windows server 2003
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.

13 lines
333 B

  1. on error resume next
  2. set l = CreateObject ("WbemScripting.SwbemLocator")
  3. set ns = l.Open ("root\cimv2")
  4. ns.filter_ = Array ("Win32_service")
  5. for each p in ns
  6. WScript.Echo p.Path_.Path
  7. next
  8. set os = ns.ExecQuery ("select * from win32_process go select * from win32_service")
  9. for each p in os
  10. WScript.Echo p.Name
  11. next