I am trying to a list of websites from the local machine that IIS has available. I am trying to use the CoGetObject to access WMI but i cannot get it to work any ways that i have been able to find online. Ultimately i am trying to get the Virtual Directory path for any current website that may exist on the users machine before install or upgrade.
What i have tried so far is not working for me. Anyone have something working with IIS 7.5 on Win7 x64?
I've tried these same pieces of code for GetObject as well with no success
What i have tried so far is not working for me. Anyone have something working with IIS 7.5 on Win7 x64?
Code:
set oIISRoot = CoGetObject("IIS://localhost/W3SVC","");
Code:
set oIISRoot = CoGetObject("winmgmts:\\.\root\CIMV2", "");
Code:
set oIISRoot = CoGetObject("IIS://localhost/W3SVC/1/ROOT");
I have had limited success on some machines with this