Source code of Windows XP (NT5)
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.

56 lines
1.6 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Enumerate through properties</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <%
  7. Dim MetaUtil
  8. Dim Properties
  9. Dim Property
  10. 'Create the MetaUtil object
  11. Set MetaUtil = Server.CreateObject("MSWC.MetaUtil.1")
  12. 'Count then enumberate with a base Key of ""
  13. Response.Write("<FONT SIZE=+1>Base key of """" </FONT><br>" + CHR(13) + CHR(10))
  14. Response.Write("<br>" + CHR(13) + CHR(10))
  15. Set Properties = MetaUtil.EnumProperties("")
  16. Response.Write("Count the Properties:<br>" + CHR(13) + CHR(10))
  17. Response.Write(Properties.Count)
  18. Response.Write("<br>" + CHR(13) + CHR(10))
  19. Response.Write("Enumerate the Properties:<br>" + CHR(13) + CHR(10))
  20. For Each Property In Properties
  21. Response.Write(Property.Id)
  22. Response.Write("<br>" + CHR(13) + CHR(10))
  23. Next
  24. Response.Write("<br>" + CHR(13) + CHR(10))
  25. 'Count then enumberate with a base Key of "LM/W3SVC"
  26. Response.Write("<FONT SIZE=+1>Base key of ""LM/W3SVC"" </FONT><br>" + CHR(13) + CHR(10))
  27. Response.Write("<br>" + CHR(13) + CHR(10))
  28. Set Properties = MetaUtil.EnumProperties("LM/W3SVC")
  29. Response.Write("Count the Properties:<br>" + CHR(13) + CHR(10))
  30. Response.Write(Properties.Count)
  31. Response.Write("<br>" + CHR(13) + CHR(10))
  32. Response.Write("Enumerate the Properties:<br>" + CHR(13) + CHR(10))
  33. For Each Property In Properties
  34. Response.Write(Property.Id)
  35. Response.Write("<br>" + CHR(13) + CHR(10))
  36. Next
  37. Response.Write("<br>" + CHR(13) + CHR(10))
  38. Response.Write("Done<br>")
  39. 'Clean up the reference to IIS.MetaUtil
  40. Session.Abandon
  41. %>
  42. </BODY>
  43. </HTML>