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.

60 lines
1.6 KiB

  1. <HTML>
  2. <HEAD>
  3. <TITLE>Enumerate through keys</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <%
  7. Dim MetaUtil
  8. Dim Keys
  9. Dim Key
  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 Keys = MetaUtil.EnumKeys("")
  16. Response.Write("Count the Keys:<br>" + CHR(13) + CHR(10))
  17. Response.Write(Keys.Count)
  18. Response.Write("<br>" + CHR(13) + CHR(10))
  19. Response.Write("<br>" + CHR(13) + CHR(10))
  20. Response.Write("Enumerate the Keys:<br>" + CHR(13) + CHR(10))
  21. For Each Key In Keys
  22. Response.Write(Key)
  23. Response.Write("<br>" + CHR(13) + CHR(10))
  24. Next
  25. Response.Write("<br>" + CHR(13) + CHR(10))
  26. 'Count then enumberate with a base Key of "LM/Schema/Classes"
  27. Response.Write("<FONT SIZE=+1>Base key of ""LM/Schema/Classes"" </FONT><br>" + CHR(13) + CHR(10))
  28. Response.Write("<br>" + CHR(13) + CHR(10))
  29. Set Keys = MetaUtil.EnumKeys("LM/Schema/Classes")
  30. Response.Write("Count the Keys:<br>" + CHR(13) + CHR(10))
  31. Response.Write(Keys.Count)
  32. Response.Write("<br>" + CHR(13) + CHR(10))
  33. Response.Write("<br>" + CHR(13) + CHR(10))
  34. Response.Write("Enumerate the Keys:<br>" + CHR(13) + CHR(10))
  35. For Each Key In Keys
  36. Response.Write(Key)
  37. Response.Write("<br>" + CHR(13) + CHR(10))
  38. Next
  39. Response.Write("<br>" + CHR(13) + CHR(10))
  40. Response.Write("Done<br>")
  41. 'Clean up the reference to IIS.MetaUtil
  42. Session.Abandon
  43. %>
  44. </BODY>
  45. </HTML>