views:

98

answers:

2

I am trying to automate some of the build process for my asp.net apps by creating the virtual directories it needs and setting all their settings in a batch file. So far I have been able to figure out how to create virtual directories, but how to do you configure them beyond that?

For example I need to be able to set them as an application, set the default document, change framework version, turn on integrated authentication, etc. Does anyone know of any scripts that can do all this without a third party utility? Does the adsutil.vbs admin script do any of this?

A: 

Thanks, that documentation helped a lot. I wanted to post the script I ended up with. It generates the virtual directory, sets access settings, makes it an application, sets its isoloation level, sets default document, sets authentication, and even sets the framework version. Its everything I have been looking for. It does it all with the admin scripts that come with IIS5.

mkwebdir -c LocalHost -w "Default Web Site" -v "myvirdirectory","C:\Website Path\..."
adsutil APPCREATEINPROC w3svc/1/root/myvirdirectory
adsutil SET w3svc/1/root/myvirdirectory/AppFriendlyName myvirdirectory
adsutil SET w3svc/1/root/myvirdirectory/AccessScript True
adsutil SET w3svc/1/root/myvirdirectory/AppIsolated 2
adsutil SET w3svc/1/root/myvirdirectory/AuthAnonymous True
adsutil SET w3svc/1/root/myvirdirectory/AuthNTLM False
adsutil SET w3svc/1/root/myvirdirectory/AuthBasic False
adsutil SET w3svc/1/root/myvirdirectory/DefaultDoc index.aspx
adsutil SET w3svc/1/root/myvirdirectory/EnableDefaultDoc True
%windir%\microsoft.net\framework\v2.0.50727\aspnet_regiis -s w3svc/1/root/myvirdirectory
Jason