Grant, Use the IIS Directory Services object. During a normal IIS 5.0 install on Win 2K, working VBS examples can be found in the C:\InetPub\AdminScripts directory. The VBS examples can be easily converted to ASP code. We have been using DS to build web sites since it came out on NT4. The following is a very short example in ASP code. Replace <term> with appropriate values, which can be hardcoded or concatenated variables as required.
-------------------------------------------- Set SrvObj = GetObject( "IIS://" & "<ServerName>" & "/W3SVC/" & Str( <WwwServiceNumber> ) ) Set RootObj = SrvObj.Create( "IIsWebVirtualDir", "<VirtualDirectoryName>") RootObj.Path = "<LocalPathToVirtualDirectory Ex:C:\MyDir>" RootObj.AppFriendlyName = "Default Application" RootObj.AuthNTLM=<True or False> RootObj.AuthBasic=<True or False> RootObj.AccessRead=<True or False> RootObj.AccessScript=<True or False> RootObj.AccessWrite=<True or False> RootObj.AccessExecute=<True or False> RootObj.AppCreate <True or False> RootObj.SetInfo -------------------------------------------- Having Fun, Dancing on the dark side of the moon. Mike ----- Original Message ----- From: "Grant Griffith - IMail" <[EMAIL PROTECTED]> To: "imail" <[EMAIL PROTECTED]> Sent: Thursday, October 10, 2002 11:56 AM Subject: [IMail Forum] OT: Creating a Virtual Directory using ASP? Hello All, I know this is very off topic, but there are allot of admins here that might be able to help me. Does anyone know of a way to create an Virtual directory for a current website using ASP code on that site? We have a website we are doing allot of work on and this would save us lots of time to be able to Add/Modify/Delete these from within a script when they added some information to a database. Please feel free to email me directly on this to keep the traffic off the IMail list. [EMAIL PROTECTED] Thanks All! Sincerely, Grant Griffith, Vice President EI8HT LEGS Web Management Co., Inc. http://www.getafreewebsite.com 877-483-3393 To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/ To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/ Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
