Dear all,
Below script will list all available application pool on IIS
option explicit
dim AppsInPool, objAppPool, index, IISObj, IISPath, Version, pos
Dim Versions(), objAppPools
Set objAppPools = GetObject("IIS://localhost/W3SVC/AppPools")
for each objAppPool in objAppPools
Set objAppPool = GetObject("IIS://localhost/W3SVC/AppPools/" & objAppPool.Name )
WScript.echo objAppPool.Name
next
I have modified according to my requirements as shown below
dim AppsInPool, objAppPool, index, IISObj, IISPath, Version, pos
Dim Versions(), objAppPools
Dim idx
Const comboProp = "COMBOBOX_APPPOOL_PROP"
Const orderStart = 10
Const orderDelta = 5
Const SEP_1 = "#"
Const SEP_2 = "|"
AIComboData = comboProp & SEP_1 & CStr(orderStart) & SEP_1 & CStr(orderDelta)
' used as index; first env. var. will be selected in combo
idx = -1
Set objAppPools = GetObject("IIS://localhost/W3SVC/AppPools")
for each objAppPool in objAppPools
Set objAppPool = GetObject("IIS://localhost/W3SVC/AppPools/" & objAppPool.Name )
AIComboData = AIComboData & SEP_2 & objAppPool.Name & SEP_1 & objAppPool.Name
next
Session.Property("AI_COMBOBOX_DATA") = AIComboData
Session.DoAction("PopulateComboBox_1")
when i run the MSI file with the above scripts on Windows7 PC it list all the application pools perfectly.
When i run the MSI file with the above scripts on Windows2003 it is not at all showing all the application pools.
Please tell me your suggestions...
FOLLOW US
Get the latest news in Application Packaging