The following vbscript worked fine on XP computers but is not working on Windows 7 computers.
Set objIISRoot = getObject("IIS://localhost/W3SVC/1/Root")
mstrIISRootPath = objIISRoot.Path
' yadda yadda yadda...more stuff goes on..
Set objIISRoot = nothing
“objIISRoot” is null so referencing objIISRoot.Path throws an error. How do you get at the default web in IIS on Windows 7?
Windows7 removed the WMI-based administrative programming interface that allows you to do
getObject("iis://localhost...")you have a couple options:
I guess the VBScript would be pretty similar.
Start...Run...optionalfeatures.exeand then turn on the WMI stuff.After doing that your old WMI script will run.