Hi,
Just as Ken stated, you can use adsutil.vbs utility to set path for virtual
directory. For example:
cscript adsutil.vbs set w3svc/1/root/virtualdirectory/path
"c:\inetpub\vdir1"
1 here is the site ID of Default Web Site which can be viewed in the right
panel by clicking Web Sites folder in IIS6. You may also open and view IIS
metabase via the Metabase Explorer tool which will give you a clear
understanding of IIS structured config data. It's included in IIS6 resource
kit tools:
Internet Information Services (IIS) 6.0 Resource Kit Tools
http://www.microsoft.com/downloads/details.aspx?displaylang=en&familyid=56fc
92ee-a71a-4c73-b628-ade629c89499
If you want to write your own script to do this, it's also quite simple
enough. Below is a sample using ADSI:
strComputer = "LocalHost"
Set objIIS = GetObject("IIS://" & strComputer &
"/W3SVC/1/ROOT/VirtualDirectory")
objIIS.Path = "C:\Inetpub\vdir1"
objIIS.SetInfo
Feel free to update here if you have any further question.
Have a great week.
Sincerely,
WenJun Zhang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at:
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
>> Stay informed about: writing script to change local path of virtual directory