How to Create a Virtual Directory
Keywords: Create virtual directory dsCreatObj dsSetObj
Question:
Is there a winbatch function that I can use to create, set ID/password for a virtual directory?Answer:
You can create a virtual directory using the ADSI extender's dsCreatObj and dsSetObj functions. Something like this:sPath = "IIS://localhost/W3SVC/1/ROOT" ; Create a vdir sVdirPath = dsCreateObj(sPath, "IIsWebVirtualDir", "TestVdir") dsSetObj(sVdirPath)I am not sure how to set up password protection but look at the properties of your new virtual dir. There may be some hint there.NB: Make sure you set the properties for the virtualdir object.
Article ID: W15034