<%
Dim MetaUtil
Dim Keys
Dim i
Dim Key
'Create the MetaUtil object
Set MetaUtil = Server.CreateObject("MSWC.MetaUtil.1")
'Count then enumberate with a base Key of ""
Response.Write("Base key of """"
" + CHR(13) + CHR(10))
Response.Write("
" + CHR(13) + CHR(10))
Set Keys = MetaUtil.EnumAllKeys("")
Response.Write("Count the Keys:
" + CHR(13) + CHR(10))
Response.Write(Keys.Count)
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("Loop through the Keys:
" + CHR(13) + CHR(10))
For i = 1 To Keys.Count
Response.Write(Keys.Item(i))
Response.Write("
" + CHR(13) + CHR(10))
Next
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("Loop through the Keys (backwards):
" + CHR(13) + CHR(10))
For i = Keys.Count To 1 Step -1
Response.Write(Keys.Item(i))
Response.Write("
" + CHR(13) + CHR(10))
Next
Response.Write("
" + CHR(13) + CHR(10))
'Count then enumberate with a base Key of "LM/Schema/Classes"
Response.Write("Base key of ""LM/Schema/Classes""
" + CHR(13) + CHR(10))
Response.Write("
" + CHR(13) + CHR(10))
Set Keys = MetaUtil.EnumAllKeys("LM/Schema/Classes")
Response.Write("Count the Keys:
" + CHR(13) + CHR(10))
Response.Write(Keys.Count)
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("Loop through the Keys:
" + CHR(13) + CHR(10))
For i = 1 To Keys.Count
Response.Write(Keys.Item(i))
Response.Write("
" + CHR(13) + CHR(10))
Next
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("Loop through the Keys (backwards):
" + CHR(13) + CHR(10))
For i = Keys.Count To 1 Step -1
Response.Write(Keys.Item(i))
Response.Write("
" + CHR(13) + CHR(10))
Next
Response.Write("
" + CHR(13) + CHR(10))
Response.Write("Done
")
'Clean up the reference to IIS.MetaUtil
Session.Abandon
%>