This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Installscript: Get IIS WebSites with WMI
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 02, 2015
10:27 AM
Installscript: Get IIS WebSites with WMI
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?
set oIISRoot = CoGetObject("IIS://localhost/W3SVC","");
set oIISRoot = CoGetObject("winmgmts:\\.\root\CIMV2", "");
set oIISRoot = CoGetObject("IIS://localhost/W3SVC/1/ROOT");
I have had limited success on some machines with this
I've tried these same pieces of code for GetObject as well with no success
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2015
09:20 AM
Anyone have any suggestions?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2015
10:24 AM
From a command prompt or bat file do this:
set "appcmd=%windir%\system32\inetsrv\appcmd.exe"
%appcmd% list site
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 14, 2015
03:20 PM
rguggisberg wrote:
From a command prompt or bat file do this:set "appcmd=%windir%\system32\inetsrv\appcmd.exe"
%appcmd% list site
I ended up taking this route. appcmd.exe can handle what i need it too. Thanks
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)