I'm writing IIS admin scripts using code like this:
Set objIISVDir = objIIS.Create("IISWebVirtualDir", "Live")
objIISVDir.Put "Path", "d:\mywebdir"
objIISVDir.Put "AccessRead", True
objIISVDir.Put "AccessScript", True
objIISVDir.Put "DefaultDoc", "logon.asp"
Thats working OK, now I need to access a physical subdirectory in order to change the content expiry settings
I can do this:
Set objIISVDir = getobject("IIS://localhost/W3SVC/1/Root/Live")
but I can't do this
Set objIISVDir = getobject("IIS://localhost/W3SVC/1/Root/Live/userfiles")
So "Live" obviously exists, but userfiles does exist as a subdirectory and yet I can't get an IIS object to point to it.
I don't want to make it a virtual directory, I just want to set the content expiry on the subdir as you can in IIS
Any ideas ?