Home All Groups Group Topic Archive Search About

Re: script to create a website in IIS



Author
3 Oct 2007 11:55 AM
hajaworld@yahoo.co.in
Show quote
"Glenn" wrote:

> Is there a way to apply this rights to a virtual website?
>
>
> "SlowBob" <slowbob@noemail.noemail> wrote in message
> news:6C3DA6DF-F7A9-428E-85FC-C10E90B46CF1@microsoft.com...
> > You have created the site and now just need to configure it.
> >
> > There is an excellent article on MSDN that covers this topic:
> >
> > http://msdn2.microsoft.com/en-us/library/ms524913.aspx
> >
> > The directory perms are controlled by the AccessFlags property.  In the
> > MSDN
> > article, this line specifies the perms.
> >
> > vdirObj.AccessFlags = 513 ' read, script
> >
> > 1 = None
> > 513 = Scripts only
> > 517 = Scripts and Executables
> >
> > Hope this helps.  Let us know if it does.
> >
> >
> > "Sylvia" wrote:
> >
> >> I found this script in the repository, and it works great.  however, I
> >> need
> >> to modify it so that when I look at the Home directory tab "Read" is
> >> checked
> >> off" and "Execute permissions" say "Scripts only".  I can't find any
> >> directions on how to do that.
> >>
> >> How can I modify this script for that?
> >>
> >> Thanks!
> >>
> >> strComputer = "."
> >> Set objWMIService = GetObject _
> >>     ("winmgmts:{authenticationLevel=pktPrivacy}\\" _
> >>         & strComputer & "\root\microsoftiisv2")
> >>
> >> Set objWebService = objWMIService.ExecQuery _
> >>     ("Select * From IISWebService")
> >>
> >> arrBindings = Array(0)
> >> Set arrBindings(0) = _
> >>     objWMIService.Get("ServerBinding").SpawnInstance_()
> >> arrBindings(0).IP = "192.168.1.1"
> >> arrBindings(0).Port = "8383"
> >> arrBindings(0).Hostname = "atl-ws-01"
> >>
> >> For Each objItem in objWebService
> >>     objItem.CreateNewSite "Test Site", arrBindings, _
> >>         "c:\inetpub\wwwroot"
> >> Next
> >>
> >>
> >>
> >>
>
>

AddThis Social Bookmark Button