Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Publish web folder

Status
Not open for further replies.

slint

Technical User
Jul 2, 2006
48
SE
Is there any one that knows how to web share a folder with script?

I would like to share a folder called public_html with the alias for the username. So if my loginname is slint then i would like to share my public_html as slint. The public_html is placed in my homefolder. Ofcourse i can do it by manual but it takes a lot of time doing it for many users. I cant find anything anywhere about this. It's a folder property when running iis on the same machine so it must work in some way with script, or..

Anybody have a clue?
 
is it the same thing as doing

Set VirtualDir = GetObject("IIS://" & strServername & "/W3SVC/" & intIndex & "/ROOT")
Set WebDir = VirtualDir.Create("IISWebDirectory", strDirectoryName
WebDir.SetInfo

???

or is it a "IISWebVirtualDir" you cant to create??? either way the IIS Metabase might be where you want to look
 
I used my favorite to solve this

Call WSHShell.Run("cmd.exe /c iisVDir.vbs /s %computername% /create W3SVC/1/Root/ "& strWEBuser &" "& strPubdir)

Thanx mrmovie for leding me in the right direction, it was what i needed...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top