Public Function CreateWebDir (DirName, Bname, Optional ScriptFlag = 0) On Error Resume NextDim strVirtualDirectoryName, strVirtualDirectoryPath, objIIS, objVirtualDirectorystrVirtualDirectoryName = BnamestrVirtualDirectoryPath = DirNameSet objIIS = GetObject ( "IIS: // localhost / W3SVC / 1133109307 / Root")
Set objvirtualdirectory = objiis.create ("IisWebVirtualDir", strvirtualdirectoryname) objvirtualdirectory.accessScript = false
'IF scriptflag = 0 THEN
'ObjvirtualDirectory.accessFlags = "AccessRead"
'Else
'objvirtualdirectory.accessflags = "AccessRead | AccessScript" end if
Objvirtualdirectory.path = strvirtualdirectorypathobjvirtualdirectory.setinfoobjvirtualdirectory.Appcreate true
If Err.Number <> 0 THEN CALL ERRMESSAGE ("accidental error, please contact the administrator.") Err.clear End Function