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.

28 lines
788 B

  1. <HTML>
  2. <HEAD>
  3. <TITLE>WBEM VBScript Example</TITLE>
  4. <SCRIPT FOR="mysink" EVENT="OnObjectReady(objObject, objAsyncContext)" LANGUAGE="VBScript">
  5. document.all.info.innerText = objObject.TargetInstance.Message
  6. </SCRIPT>
  7. <SCRIPT LANGUAGE="VBScript">
  8. <!--
  9. Sub window_onLoad
  10. Set Service = Locator.ConnectServer()
  11. Service.Security_.ImpersonationLevel=3
  12. Service.ExecNotificationQueryAsync mysink, _
  13. "select * from __instancecreationevent where targetinstance isa 'Win32_NTLogEvent'"
  14. end sub
  15. -->
  16. </SCRIPT>
  17. </HEAD>
  18. <BODY>
  19. <SPAN ID="info">
  20. No event received yet
  21. </SPAN>.
  22. <OBJECT ID="Locator" CLASSID="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6"></OBJECT>
  23. <OBJECT ID="mysink" CLASSID="CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223"></OBJECT>
  24. </BODY>
  25. </HTML>