I need to implement some versioning for deployment for the app I support where I can copy the site to say c:\inetpub\wwwroot\app_v2 and then switch the virtual directory from c:\inetpub\wwwroot\app_v1.
Is there a way to change the physical path for a virtual directory in IIS from the command line?
Edit:
i found that in IIS7 you can use appcmd to set the physical path of a virtual directory using this format on this page Change the Physical Path of Virtual Directory Content. I was looking for something more universal….
appcmd set vdir /vdir.name:string /physicalPath:string
However, there doesnt seem to be an equivelant for IIS 6.
Best Answer
Yes, look at WMI scripting.
http://learn.iis.net/page.aspx/163/managing-applications-and-application-pools-on-iis-7-with-wmi/
http://www.aspfree.com/c/a/IIS/IIS-60-Getting-Information-Using-WMI/3/
Nick