|
vDirName = "IssueVisionWebWseCS" ' Replace with the name of the virtual directory
Set shell = Wscript.CreateObject( "WScript.Shell" )
' Does this IIS application already exist in the metabase?
On Error Resume Next
Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root/" & vDirName)
If Err.Number > 0 Then
shell.Popup "An virtual directory named " & vDirName & " does not exists. ", 0, "Error", 16 ' 16 = Stop
Wscript.quit
End If
Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root")
objIIS.Delete "IISWebVirtualDir", vDirName
If Err.Number = 0 Then
shell.Popup "Virtual directory deleted sucessfully", 0, "All done", 64 ' 64 = Information
Else
shell.Popup Err.Description, 0, "Error", 16 ' 16 = Stop
End If
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
Weidong has been an information system professional since 1990. He has a Master's degree in Computer Science, and is currently a MCSD .NET