'------------------------------------------------------------------------- 'Global Variables '------------------------------------------------------------------------- Dim G_ADMIN_PORT Dim G_HTTP Dim G_IIS Dim G_HOST Dim G_ADMIN_NAME Dim G_SHARES_WEBSITEID Dim G_SHARES_NAME Dim G_objHTTPService 'WMI server HTTP object Dim G_nNICCount 'NIC count Dim G_objService 'WMI server HTTP object Dim G_ADMIN_WEBSITEID 'HTTP administration web site WMI name Dim strComputerName Const WMI_IIS_NAMESPACE = "root\MicrosoftIISv1" 'constant to connect to WMI G_ADMIN_PORT = "0" G_ADMIN_NAME = "Administration" G_SHARES_NAME = "Shares" G_HTTP = "http://" G_IIS = "IIS://" G_HOST = GetSystemName() G_SHARES_WEBSITEID = "0" Set G_objHTTPService = GetWMIConnection(WMI_IIS_NAMESPACE) Set G_objService = GetWMIConnection("Default") G_SHARES_WEBSITEID = GetWebSiteID( G_SHARES_NAME ) G_ADMIN_WEBSITEID = GetWebSiteID( G_ADMIN_NAME ) G_ADMIN_PORT = GetAdminPortNumber() Dim strSharesFolder Set oFileSystemObject = CreateObject("Scripting.FileSystemObject") strSharesFolder = GetSharesWebSitePath("Shares") strSharesFolder = "c:\inetpub\shares" Set oDefaultHTMFile = oFileSystemObject.CreateTextFile( strSharesFolder + "\default.asp", True) oDefaultHTMFile.WriteLine( chr(60) & chr(37) ) oDefaultHTMFile.WriteLine( "Dim strServerName " ) oDefaultHTMFile.WriteLine( "Dim WinNTSysInfo " ) oDefaultHTMFile.WriteLine( "Set WinNTSysInfo = CreateObject(""WinNTSystemInfo"") " ) oDefaultHTMFile.WriteLine( "strServerName = UCASE( WinNTSysInfo.ComputerName ) " ) oDefaultHTMFile.WriteLine( chr(37) & chr(62) ) '------------------------------------------------------------------------- 'Start of localization content '------------------------------------------------------------------------- Dim L_HEADER Dim L_FOOTER Dim objLocMgr Dim varReplace varReplace = "" Set objLocMgr = CreateObject("ServerAppliance.localizationmanager") L_HEADER = GetLocString("httpsh.dll", "40300001", "") L_FOOTER = GetLocString("httpsh.dll", "40300002", "") set objLocMgr = nothing '------------------------------------------------------------------------- 'End of localization content '------------------------------------------------------------------------- oDefaultHTMFile.WriteLine("
" ) oDefaultHTMFile.WriteLine("" ) oDefaultHTMFile.WriteLine(" | " + "<" & "% = strServerName" & "%" & ">" + " | |
" ) urlHTTPSAdmin = G_HTTPS + "<" & "% = strServerName" & "%" & ">" + ":" + G_SHARES_PORT 'oDefaultHTMFile.Writeline( " " )
'oDefaultHTMFile.Writeline( "" + L_HTTPS_FOOTER + " ")
urlAdmin = G_HTTP + "<" & "% = strServerName" & "%" & ">" + ":" + G_ADMIN_PORT
oDefaultHTMFile.Writeline( "" )
oDefaultHTMFile.Writeline( "" + L_FOOTER + " " )
oDefaultHTMFile.WriteLine(" | " ) oDefaultHTMFile.WriteLine(" " )
oDefaultHTMFile.WriteLine( L_HEADER + " " + "<" & "% = strServerName" & "%" & ">" + "" )
oDefaultHTMFile.WriteLine(" ")
Dim oWebVirtDir
Dim oWebRoot
Dim index
Dim urlAdmin, i, urlHTTPSAdmin
Dim arrVroots()
ReDim arrVroots(5000, 1 )
Set oWebRoot = GetObject( "IIS://" & G_HOST & "/" & G_SHARES_WEBSITEID & "/root")
index = -1
For Each oWebVirtDir in oWebRoot
index = index + 1
arrVroots( index, 0 ) = oWebVirtDir.Name
Next
'Call QuickSort( arrVroots, 0, index, 1, 0 )
If Index = -1 Then
oDefaultHTMFile.Writeline( "" )
End If
For i = 0 To index
oDefaultHTMFile.Writeline( " ")
Next
oDefaultHTMFile.WriteLine("")
oDefaultHTMFile.Writeline(" " + arrVroots( i, 0 ) + " " )
'oDefaultHTMFile.WriteLine(" |