cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
soulMiner
Level 3

Challenge: Enumerate IIS Websites and Display Them In A Combobox

Difficulty: Do it without MSI, use only regular InstallScript, VB, etc.

Hello, I can successfully get an object of the IIS parent type using only InstallScript, but I can't move to the next child object to get the next website in the series.

IIS://localhost/W3SVC/1/Root allows me to show the display name of the website. Foolishly, I thought that incrementing the number in the path between W3SVC/[1]/Root would just take me to the next site. I was wrong.

How do I list the child websites in InstallScript? Or if I just use VBScript to do it with WSH, how do I pass the results back to IS, so that I can display them in a dropdown. Would I use session variables in my call to WSH. In this case the return would be a collection or an array, so I did not think that would work.
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

I haven't looked that closely at it, but [thread=138566]this thread[/thread] claims to be doing something like that.
0 Kudos
soulMiner
Level 3

Thanks Robert,

This thread from the archives is the basis for the thread that you cited.

The issue comes from the fact that there is no native InstallScript support for enumerating collections. i.e. No For...Each. A person who seems to have been once employed at InstallShield provided the solution. That same person, Ming Baio Fei kindly provided the source for a C++ dll to use in a project to extend this functionality into InstallScript.

Here is another blog post on the topic, but I prefer the method and code provided by Ming Biao Fei.

Way to go. Thanks.
0 Kudos