IIS: check exsting host name - Advanced Installer Community
jean
Posts: 3
Joined: Wed May 17, 2017 10:38 am

IIS: check exsting host name

Dear Advanced Installer Support Team,

I succeeded to set up new website as well as its http port and host name. However, I am having a problem to check whether the website name and host name I input have been existing in my IIS management during installation. I want to do this to avoid any conflicts between new websites and existing ones. What I want is when my inputs(host and website names) are the same as existing ones, the dialog will send alert and not continue.

I think I can this by adding some published events on the "next" button of the dialog but don't know details of it.
If you could provide me with a sample I will really appreciate it.


Sincerely,
Jean.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS: check exsting host name

Hello Jean,

To check the IP address and PORT number availability you can use our "Check TCP port" custom action type. Just add it as a custom action WITHOUT SEQUENCE and then call it using an "Execute custom action" event from a UI control.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jean
Posts: 3
Joined: Wed May 17, 2017 10:38 am

Re: IIS: check exsting host name

Hello Daniel,

Thanks for your help and now I made it to add the published events for port. In the sample posted, the events are like:

execute custom action ------ CheckFreeTCPPort ------- AI_INSTALL
Display a specific dialog ------ FolderDlg -------- AI_PORT_TEST_RES="FreePort"
Display a specific child dialog ------ SpawnDialog ------- AI_INSTALL AND (AI_PORT_TEST_RES = "UsedPort") OR (AI_PORT_TEST_RES = "SockError")

But what are the events if I want to check availability of a host name or IP?


And there is another question that I have used a SpawnDialog in an SQL connection dialog, so when I call this in the CHECKPORT dialog it popped out the same text as it is in SQL connection dialog. How can I change the text in a SpawnDialog only in one specific dialog while keep others unchanged?

Thank you!
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS: check exsting host name

Hello Jean,
But what are the events if I want to check availability of a host name or IP?
For such a check we do not have a dedicated custom action. To do so you should write your own custom action which could perform the check and save the results into an installer property.
And there is another question that I have used a SpawnDialog in an SQL connection dialog, so when I call this in the CHECKPORT dialog it popped out the same text as it is in SQL connection dialog. How can I change the text in a SpawnDialog only in one specific dialog while keep others unchanged?
This is not possible. As a workaround you should instead create and use two different spawn dialogs.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”