WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2002:09:05:13:49:16
Last Updated: 2002:09:05:13:49:16