Hi Toby,
Based on my research and experience, the following Knowledge Base article
is useful to you. Please refer to it carefully.
HOW TO: Create a Virtual Web Server by Using an ADSI Script in IIS
http://support.microsoft.com/default.aspx?scid=kb;en-us;315599
You can find the mkw3site.vbs file in the "\Inetpub\AdminScripts" directory.
For your convenience, I have also written a simple code snippet for your
reference.
"...
Dim w3svc
Set w3svc = GetObject("IIS://localhost/w3svc")
Set NewWebServer = w3svc.Create("IIsWebServer", 3)
NewWebServer.ServerSize = 1
NewWebServer.ServerAutoStart = 1
NewWebServer.ServerComment = "Third Web Site"
NewWebServer.ServerBindings = Array(":1010:")
NewWebServer.SetInfo
Set NewWebServer = GetObject("IIS://localhost/w3svc/3")
Set NewDir = NewWebServer.Create("IIsWebVirtualDir", "ROOT")
NewDir.Path = "F:\Inetpub\AdminScripts"
NewDir.AccessRead = True
NewDir.SetInfo
NewDir.AppCreate (True)
NewWebServer.Start
..."
Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.