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.

21 lines
569 B

  1. <HTML>
  2. <HEAD>
  3. <TITLE>WBEM VBScript Example</TITLE>
  4. <SCRIPT LANGUAGE="VBScript">
  5. Sub window_onload
  6. 'Set Locator = CreateObject("WbemScripting.SWbemLocator")
  7. Set Service = Locator.ConnectServer()
  8. Service.Security_.ImpersonationLevel=3
  9. Set Process = Service.Get("Win32_Service.Name=""Winmgmt""")
  10. document.all.info.innerText = Process.DisplayName
  11. end sub
  12. </SCRIPT>
  13. </HEAD>
  14. <BODY>
  15. The name of the service is
  16. <SPAN ID="info">
  17. unknown
  18. </SPAN>.
  19. <OBJECT ID="Locator" CLASSID="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6"></OBJECT>
  20. </BODY>
  21. </HTML>