In the Metabase hierarchy, the virtual directory sits one level below the site. To bind to a virtual directory under any site, simply reference the desired site's index number, and then append the name of the virtual directory.
The following Visual Basic code demonstrates the binding of the IISHELP virtual directory under the Default Web Site:
Dim VirtualDirectory as IADs Dim ServerName As String Dim Index As Long Dim VirtualDirectoryName as String ServerName = "IIS_Server_Name" Index = Site_Index_Value VirtualDirectoryName = "Virtual_Directory_Name" Set VirtualDirectory = GetObject("IIS://" & ServerName & "/W3SVC/" & Index & "/ROOT" & VirtualDirectoryName)
Top |