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.

89 lines
2.4 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Microsoft System Information</TITLE>
  4. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=windows-1252">
  5. <META HTTP-EQUIV=PICS-Label CONTENT='(PICS-1.1 "http://www.rsac.org/ratingsv01.html" l comment "RSACi North America Server" by "[email protected]" r (n 0 s 0 v 0 l 0))'>
  6. <SCRIPT ID=Script1 SRC="/scripts/Common.js"></SCRIPT>
  7. <LINK ID=Stylesheet_Ref1 href="/css/PCHealth.css" rel=STYLESHEET type=text/css>
  8. <SCRIPT LANGUAGE=VBScript>
  9. Dim g_oDc,g_ms
  10. Function CreateDCO()
  11. ' Create the data collection object.
  12. Set g_oDc = pchealth.CreateObject_DataCollection
  13. set g_ms = msinfo
  14. ' Specify the data set. need to change to relative path
  15. g_oDc.History_MaxDeltas = 30
  16. g_oDc.MachineData_Dataspec = GetVendorPath & szUploadXMLFileName
  17. g_oDc.History_Dataspec = GetWinPath & "\PCHealth\HelpCtr\Config\DataSpec.XML"
  18. g_oDc.onComplete = dc_onCompleteJS
  19. g_oDc.OnProgress = dc_onProgressJS
  20. g_ms.DCO_IUnknown = g_oDc
  21. 'g_oDc.ExecuteASync
  22. end Function
  23. sub dc_onComplete(DataCollectionPtr, hresult)
  24. if not (g_oDc is Nothing) then
  25. set stream = g_oDc.History_GetStream
  26. g_ms.SetHistoryStream(stream)
  27. 'we don't need a separate machinedata stream, because the history contains a snapshot
  28. 'set stream2 = g_oDc.MachineData_GetStream
  29. 'g_ms.SetMachineDataStream(stream2)
  30. 'BODY onload=test()
  31. end if
  32. end sub
  33. sub dc_onProgress(DataCollectionPtr, done, total)
  34. Dim PercentDone
  35. if total = 0 then
  36. ' Avoid divide-by-zero errors.
  37. total = 100
  38. end if
  39. PercentDone = Round(done / total * 90)
  40. if not (g_ms is Nothing) then
  41. g_ms.UpdateDCOProgress(PercentDone)
  42. end if
  43. end sub
  44. sub killDCO
  45. if not (g_oDc is Nothing) then
  46. g_oDc.Abort
  47. end if
  48. Set g_oDc = Nothing
  49. end sub
  50. </SCRIPT>
  51. <SCRIPT LANGUAGE=JavaScript>
  52. function dc_onCompleteJS(DataCollectionPtr, hresult)
  53. {
  54. if (g_oDc != null)
  55. {
  56. dc_onComplete(DataCollectionPtr, hresult);
  57. }
  58. }
  59. function dc_onProgressJS(DataCollectionPtr, done, total)
  60. {
  61. dc_onProgress(DataCollectionPtr, done, total);
  62. }
  63. </SCRIPT>
  64. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  65. </HEAD>
  66. <BODY onload=CreateDCO() onunload=KillDCO() SCROLL=NO style="margin: 0px">
  67. <OBJECT ID="MSInfo" CLASSID="CLSID:273380E8-1438-4B2C-95B0-713284FBC302" width="100%" height="100%">
  68. </BODY>
  69. </HTML>