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.

57 lines
1.1 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE> WMI DEMO
  4. </TITLE>
  5. <SCRIPT LANGUAGE="VBSCRIPT">
  6. Dim theEventsWindow
  7. Dim MyMapiSession
  8. ' Initialize Globals
  9. Sub window_onLoad()
  10. Set MyMapiSession = CreateObject("MSMAPI.MAPISession")
  11. MyMapiSession.SignOn
  12. End Sub
  13. Sub Sendmail ( Subject , Message )
  14. '
  15. ' Send a mail message using mapi
  16. '
  17. Dim mapiMessages
  18. Set mapiMessages = CreateObject("MSMAPI.MAPIMessages")
  19. mapiMessages.SessionID = MyMapiSession.SessionID
  20. mapiMessages.Compose
  21. mapiMessages.RecipDisplayName = "demoacc"
  22. mapiMessages.RecipAddress = "demoacc"
  23. mapiMessages.AddressResolveUI = True
  24. mapiMessages.ResolveName
  25. mapiMessages.MsgSubject = Subject
  26. mapiMessages.MsgNoteText = Message
  27. mapiMessages.Send False
  28. End Sub
  29. Sub GetMachineInfo()
  30. Sendmail "Machine Opened!", "The box of the machine outsoft9.dns.microsoft.com has been opened!"
  31. End Sub
  32. </SCRIPT>
  33. </HEAD>
  34. <BODY>
  35. <BUTTON NAME="MachineInfo" ID="MachineInfo" onClick=GetMachineInfo>Get Data</BUTTON>
  36. <TEXTAREA ID="EventsWindow" ROWS=5 COLS=55>
  37. </TEXTAREA>
  38. </BODY>
  39. </HTML>