views:

1110

answers:

2

Hey there,

I found some informations about controlling IIS 5.1 from command line via adsutil.vbs (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true). The utility is available at c:\InetPub\AdminScripts.

The utility throw only errors like the following: ErrNumber: -2147463164 (0x80005004) Error Trying To GET the Schema of the property: IIS://localhost/Schema/ROOT

Can you tell me, how to check if there exists a virtual directory and create it, if it does not exist?

Thanks Thomas

+1  A: 

Hope this helps you.

http://www.codeproject.com/KB/system/commandlineweb.aspx

Codeslayer
A: 

I could not comment your post, so I have to write a new message. I was able to use the script CreateWebDir.vbs from your link and use it to create/update my virtual directory with only one call:

CreateWebDir.vbs DirName Path 80

If the virtual directory already exists, it changes the path and that's exactly, what I need. Thank you!

Thomas