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.

65 lines
1.5 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Check all keys for errors</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <%
  7. 'Carrage Return + Line Feed pair
  8. Dim CRLF
  9. CRLF = CHR(13) + CHR(10)
  10. Sub DisplayCheckError(ByRef objSchemaError)
  11. Dim strId
  12. Dim strSeverity
  13. Dim strDescription
  14. Dim strKey
  15. Dim strProperty
  16. strId = CStr(objSchemaError.Id)
  17. strSeverity = CStr(objSchemaError.Severity)
  18. strDescription = objSchemaError.Description
  19. strKey = objSchemaError.Key
  20. strProperty = CStr(objSchemaError.Property)
  21. Response.Write("Id: " & strId & "<br>" & CRLF)
  22. Response.Write("Severity: " & strSeverity & "<br>" & CRLF)
  23. Response.Write("Description: " & strDescription & "<br>" & CRLF)
  24. Response.Write("Key: " & strKey & "<br>" & CRLF)
  25. Response.Write("Property: " & strProperty & "<br>" & CRLF)
  26. End Sub
  27. Dim objMetaUtil
  28. Dim objKeys
  29. Dim strKey
  30. Dim objErrors
  31. Dim objError
  32. 'Create the MetaUtil object
  33. Set objMetaUtil = Server.CreateObject("MSWC.MetaUtil.1")
  34. Set objKeys = objMetaUtil.EnumAllKeys("")
  35. For Each strKey In objKeys
  36. Response.Write("<FONT SIZE=+1>" & strKey & ": </FONT><BR>" & CRLF)
  37. Set objErrors = objMetaUtil.CheckKey(strKey)
  38. For Each objError In objErrors
  39. DisplayCheckError objError
  40. Response.Write("<br>" & CRLF)
  41. Next
  42. Next
  43. Response.Write("<br>" & CRLF)
  44. Response.Write("Done<br>")
  45. 'Clean up the reference to IIS.MetaUtil
  46. Session.Abandon
  47. %>
  48. </BODY>
  49. </HTML>