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.

45 lines
1.4 KiB

  1. <PUBLIC:COMPONENT tagName="devinfo">
  2. <PUBLIC:PROPERTY NAME="Instance" />
  3. <PUBLIC:DEFAULTS viewLinkContent="true" />
  4. <PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="Init()" />
  5. <SCRIPT LANGUAGE="VBScript">
  6. Dim devcon
  7. Dim Inst
  8. Sub UpdateInstance()
  9. dev_instance.innerText = Inst.instanceId
  10. If Inst.IsDisabled Then
  11. dev_status.innerHtml = "<font color=""#FF0000""><b>Disabled</b></font>"
  12. ElseIf inst.HasPrivateProblem Then
  13. dev_status.innerHtml = "<font color=""#FF0000""><b>Driver reports problem</b></font>"
  14. ElseIf inst.HasProblem Then
  15. dev_status.innerHtml = "<font color=""#FF0000""><b>Problem " & CStr(Inst.ProblemCode) & "</b></font>"
  16. ElseIf inst.IsRunning Then
  17. dev_status.innerHtml = "Running"
  18. Else
  19. dev_status.innerHtml = "Stopped"
  20. End If
  21. End Sub
  22. Sub Init()
  23. set DevCon = CreateObject("DevCon.DeviceConsole")
  24. set Inst = DevCon.DevicesByInstanceIds(Instance)(1)
  25. UpdateInstance
  26. End Sub
  27. </SCRIPT>
  28. <BODY>
  29. <table border="0">
  30. <tr>
  31. <td width="70"></td>
  32. <td width="100"><i>Instance ID:</i></td>
  33. <td><span id="dev_instance"></span></td>
  34. </tr>
  35. <tr>
  36. <td width="60"></td>
  37. <td width="100"><i>Status:</i></td>
  38. <td><span id="dev_status"></span></td>
  39. </tr>
  40. </table>
  41. </BODY>
  42. </PUBLIC:COMPONENT>