View Full Version : Displaying a list of IIS Websites

06-25-2008, 06:21 PM
Hey there,

Are there any controls or dialogs that display the list of IIS websites from the clients machine to a radio button group or list box?

If not, how do I go about making one?

I need to display it to the user during the installation screen then once the user starts the installation, I need to pass that information to a custom action and change some configurable items in the configuration xml file.

Is this possible and how would I go about doing it?

I develop in C# .NET 3.5 Framework.


07-08-2008, 06:51 PM

I too am interested in doing this. If anyone has any information it would be much appreciated.

I'm surprised that there's no build in dialog for this. Do people normally just build installs, that don't allow the user to configure the website and virtual directory to install to?

07-08-2008, 07:12 PM
The specifics depend on the type of project (MSI or InstallScript), but please search these forums for "list iis websites" to see different techniques that have been used...

07-09-2008, 08:51 AM
I'd like to add that it depends on which version of IIS you have. IIS 6 and earlier you can do with some simple vbscript or installscript. On IIS7 (vista and 2008) you either have to require the IIS6 compatibility service, or do some magic. I wrote a C# custom action that uses the web management assembly. This is a big no-no for some people.

07-09-2008, 09:05 AM
Hello Everyone,

Here is a link (http://community.macrovision.com/showthread.php?t=164734) to a list of useful IIS functions that I wrote. It includes getting a list of IIS web sites. It also discusses on how to do this as well. If you need any more assistance, please let me know. I have had several people ask me questions about this subject.

Hope this helps.

07-09-2008, 03:18 PM
Thanks TheTraveler, I've seen your other posts and they're very useful :)

I've already had to go down the .NET custom assembly route for other stuff, so it looks like adding another function to that assembly will be what I'll do. Especially since I do need IIS7 and there's no guarantee they'll have the compatibility service installed. Thanks for the tip angusmf1.

07-09-2008, 05:03 PM
I've actually started using C# for all my custom needs including this. Later on I port it over to a string list then display in the dialog.