Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WestWind-automating an install including Virtual Directo
Message
From
08/03/2000 20:57:08
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00343402
Message ID:
00343546
Views:
33
>>After doing a fair amount of research, I still have some questions of ADSI:
>>
>>How do I set the name of the server?
>>How do I set the home directory?
>>How do I add a default doc to the list?
>>
>>CopyHere is excellent. I wish I had known about this before I would have saved myself a lot of time.
>>
>>TIA
>
>Look at the documentation for wwWebServer and wwIISAdmin, which lets you do what you want. You'd have to pick your Web site first then call the various other functions with the ADSI path set to this Web site.
>
>Easy as pie...


Ok here's what I have so far. I'm so close.

oWebService = GetObject( "IIS://LocalHost/W3SVC" )

* I'd like to be able to name the server, but apparently you have to give it
* the next available number. That still possible I could use GetObject until
* I received an error incrementing by 1 and that would be my new server.
oWebServer = oWebService.Create( "IIsWebServer", "13" )

* If you call the virtual directory root. It attaches itself to the server you
* just created ( at least as far as the Management Console is concerned ).
oVirtualDir = oWebServer.Create( "IIsWebVirtualDir", "Root" )

oVirtualDir.Path = "D:\INetPub\WWWRoot\WConnect\"
oVirtual.AccessExecute = .T.
oVirtual.AccessRead = .T.

lcDefaultDocs = oVirtual.DefaultDoc
IF NOT EMPTY( lcDefaultDocs )
lcDefaultDocs = "Index.Htm, " + lcDefaultDocs
ENDIF
oVirtual.DefaultDoc = lcDefaultDocs

Great. Now how do I set the name of the web site? There has to be a way.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform