469,923 Members | 1,775 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

how to create a IIS virtual directory programmatically??

I want to write a web hosting application. But how to create a IIS virtual
directory programmatically in ASP page??

please advise!
Thanks!
Jul 19 '05 #1
2 6963
Take a look at:

Start--Run---CMD--enter

cscript %systemdrive%\inetpub\adminscripts\mkwebdir.vbs -help

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:e3**************@TK2MSFTNGP11.phx.gbl...
I want to write a web hosting application. But how to create a IIS virtual
directory programmatically in ASP page??

please advise!
Thanks!

Jul 19 '05 #2
'This will get you in the ball park!
Set Root = GetObject("IIS://LocalHost/W3SVC/1/ROOT")
if (Err.Number <> 0) then
wscript.Quit
end if
Set Dir = Root.Create("IIsWebVirtualDir", "Test")
Dir.Path = "C:\ "
Dir.AccessRead = True
Dir.AccessWrite = False
Dir.EnableDirBrowsing = False
Dir.AppFriendlyName = "Test"
Dir.SetInfo
Set Dir = Nothing
Set Root = Nothing

-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Lan H. Nguyen | last post: by
8 posts views Thread by JJ | last post: by
reply views Thread by Brian Roisentul | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.