PDA

View Full Version : List IIS 7 pools with AppCmd



alexlbl
06-27-2012, 03:54 PM
I want to show the user a combobox of Application Pools available in IIS in my InstallShield interface.

I can list the pools in IIS7 with the following command:


appcmd.exe list apppool
How do I run this command and read its output so I can populate the combobox?

- I tried VBScript, but WScript.CreateObject("WScript.Shell") fails when run in the InstallShield context due to some security thing I didn't get into

Can I do this with InstallScript, how? Can I make it work with VBScript, how? Is there any other alternative?

alexlbl
06-27-2012, 04:01 PM
Hilariously, I already found out the problem with my VBScript. :rolleyes:

Call
CreateObject("WScript.Shell") instead of
WScript.CreateObject("WScript.Shell")