Option Explicit Dim sVirDir, sPhyDir Dim sComputer Dim oWebSvr, oVRoot, oVDir On Error Resume Next 'HIER: In c:Inetpubwwwroot einen Ordner MyInetApp erstellen. sComputer = "localhost" 'Wscript.Arguments(0) 'Name des Computers oder LocalHost sPhyDir = "c:inetpubwwwrootMyInetApp" 'Wscript.Arguments(1) 'Physikalischer Pfad der Web-Application sVirDir = "MyInetApp" 'Name (virtuelles Verzeichnis) der Web-Applikation Set oWebSvr = GetObject("IIS://" & sComputer & "/W3svc/1") Set oVRoot = oWebSvr.GetObject("IIsWebVirtualDir", "Root") Set oVDir = oVRoot.Create("IIsWebVirtualDir",sVirDir) oVDir.AccessRead = True oVDir.AccessWrite = True oVDir.AccessScript = True oVDir.EnableDirBrowsing = True oVDir.DefaultDoc = "Default.asp" oVDir.EnableDefaultDoc = True oVDir.Path = sPhyDir oVDir.AppCreate True oVDir.SetInfo Set oVDir = Nothing Set oVRoot = Nothing Set oWebSvr = Nothing |