JLavalley
Posts: 36
Joined: Tue Mar 03, 2009 7:28 pm

IIS Site selection

I can't seem to figure out how to get the website ID (w3svc instance number) of the web site selected.

I've looked at the Browse IIS Example (thank you) and it shows the property that contains the web site name, but I need to record the ID for later use.
- Jerome
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS Site selection

Hi,

Unfortunately the ID of a website cannot be accessed directly. However, you can try setting the "IISBrowseShowExtInfo" property to obtain detailed information about the website (including the ID). Since this information is set in the property of the combo box or list box you are using, you can parse the property with a custom action in order to retrieve the ID.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JLavalley
Posts: 36
Joined: Tue Mar 03, 2009 7:28 pm

Re: IIS Site selection

Thanks,

I understand what you are telling me to do, but am having some difficulties getting it to work.

1. I can't seem to get the listbox that displays the sites to hide the extended information. I've set the IISBrowseShowExtInfo to "0" and "1" but it doesn't seem to make any difference. Where should I set that value? On the Dialog definition (Init Events)? or on the Install Parameters page? (I've done both)

2. Once I select the desired site from the list, the value that I get back to parse is only the name of the site - not the comma separated value that the documentation says that IISBrowseOutput should have.
- Jerome
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS Site selection

Hi,
I can't seem to get the listbox that displays the sites to hide the extended information.
To hide the extended information you can simply not set the "IISBrowseShowExtInfo" property. Please note that this property should be set by:
- a published control event on the "Next" button of the dialog shown before the dialog with the list box
or
- an init control event on the dialog with the list box
Once I select the desired site from the list, the value that I get back to parse is only the name of the site - not the comma separated value that the documentation says that IISBrowseOutput should have.
Please make sure that the "IISBrowseShowExtInfo" property is set to "1" correctly by a published or init event. If this property is not set, the extended information cannot be accessed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JLavalley
Posts: 36
Joined: Tue Mar 03, 2009 7:28 pm

Re: IIS Site selection

So, if I want to get at the extended info (the WebID) I have to show it to the install user? - that's lame.

However, I have the IISBrowseShowExtInfo variable set to 1 and I still only get the Name of the selected site in the IISBrowseOutput property.

I'm testing using the "Browse IIS" sample project.
I set the IISBrowseHideVDirs property to "1".
The BrowseIIS dialog box displays the website and all the data about it (including webid, etc)
I added a textcontrol to the dialog box and set the value as the property IISBrowseOutput.

The value of IISBrowseOutput is just the name of the site...
- Jerome
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS Site selection

Hi,
So, if I want to get at the extended info (the WebID) I have to show it to the install user?
Currently this is the only way to obtain the ID through Advanced Installer. However, we have on our TODO list and improvement which will offer easier access to the web site information. This improvement will be included in a future version of Advanced Installer.
I have the IISBrowseShowExtInfo variable set to 1 and I still only get the Name of the selected site in the IISBrowseOutput property.
Please note that the "IISBrowseOutput" property contains only the web site names. The extended information can be placed only in the "IISBrowseComboBox" and "IISBrowseListBox" properties. This is explained in the Browse for IIS Web Sites & Virtual Directories how-to.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
JLavalley
Posts: 36
Joined: Tue Mar 03, 2009 7:28 pm

Re: IIS Site selection

Please note that the "IISBrowseOutput" property contains only the web site names.
But when I use the "BrowseIISListBox" or the "BrowseIISComboBox" the value only contains the web site name, even when the show IISBrowseShowExtInfo is properly set (I can see the information in the list box).

??
- Jerome
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: IIS Site selection

Hi,

I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project) file you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”