litu
Posts: 71
Joined: Fri Mar 22, 2013 2:57 pm

Browse for SQL instances in a single computer

Hello,

What I need to do is search for the SQL instances and put them on a combo box. But, not on the whole network, only in the local computer instead. Is there any way to do that?

Thanks in advance,
Arnau.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

Hello,

I'm afraid we don't have predefined support for listing the SQL Server instances installed only on local machine. However, in order to achieve what you want you can develop your own custom action. Please take a look on the "How can I get a list of installed SQL Server instances?" thread which should be useful for you.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
litu
Posts: 71
Joined: Fri Mar 22, 2013 2:57 pm

Re: Browse for SQL instances in a single computer

Hi,

That's a quite good sollution. What I don't see is how the list returned by the custom action will be included in a combo box in an install's dialog.

Thanks for your help and quick answer.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

Hello,

In order to achieve this you can take a look on the following links:
- "Dynamically Populate ComboBox via VBS"
- ComboBox and ListBox controls

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
litu
Posts: 71
Joined: Fri Mar 22, 2013 2:57 pm

Re: Browse for SQL instances in a single computer

It works!

Just a slightly, tiny, little detail. Is there a way to make one of this options selected?
The combo box shows a blank option and only if you click on the combo it shows all the instances installed.

Thanks in advance.
Arnau.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

Hello Arnau,

In order to achieve this you should just set the combo box associated property to desired element value. For example, if you have a combo box (e.g. COMBO_PROP) with the following elements:
  • Text: one
    Value: 1

    Text: two
    Value 2
and you set the "COMBO_PROP" property to 2, then the combo box will display by default the "two" element.

If you have any question let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
litu
Posts: 71
Joined: Fri Mar 22, 2013 2:57 pm

Re: Browse for SQL instances in a single computer

Hi,

This is working great!

Thank you very much.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

You're welcome Arnau.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
edgsoccer
Posts: 32
Joined: Wed Jul 02, 2014 11:07 pm

Re: Browse for SQL instances in a single computer

i have a question.. i'm getting the instances on the combo box by serverbrowse, let's say i want it to always default the combo box to the default named "express" but if the instance "express" doesn't exist to default to the first available. :?:
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

Hello,

We don't have predefined support for this. As a workaround you can try to create a custom action with your own implemented functionality.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
edgsoccer
Posts: 32
Joined: Wed Jul 02, 2014 11:07 pm

Re: Browse for SQL instances in a single computer

Where do I set the property to 2 or 1? not sure where to do this?? also can i set it by the name on the property or it has to be by the property only?

thanks
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Browse for SQL instances in a single computer

Hello,

I'm afraid I don't fully understand your last questions. Can you please give us more details about this (maybe exemplify a bit or attach a screenshot)?

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

Return to “Building Installers”