We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

kumarkiranc
Posts: 85
Joined: Tue Sep 18, 2007 6:49 am

Getting List of SQLServers in network

Hi,

I want the list of sqlservers in a combobox so that user can select one of them.



Thanks
Kiran
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Currently, Advanced Installer does not support this feature, but I have added it on our TODO list and it will be available in future version.
Thank you for your suggestion.

However, you could do this using a custom action. You can read more about custom actions here:
http://www.advancedinstaller.com/user-g ... -page.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kumarkiranc
Posts: 85
Joined: Tue Sep 18, 2007 6:49 am

Getting SQL Server LIst

Hi,

How can i get sql server list through Custom Action. Please tell me the steps.

Thanks
Kiran
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to populate a combobox you can use a VBScript custom action. There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... late+combo
How can i get sql server list through Custom Action
This can be done by modifying the custom action I mentioned above, but I'm not sure how.

You can see the following links for more details:
http://support.microsoft.com/kb/287737
http://www.codeproject.com/database/serverenum.asp
http://www.sqldev.net/misc/EnumSQLSvr.htm
http://www.sqldev.net/misc/ListSQLSvr.htm

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kumarkiranc
Posts: 85
Joined: Tue Sep 18, 2007 6:49 am

Hi,

When i run ListSQLSvr -s in command prompt, iam geting the list of SqlServers in network. How do i insert in to combobox using custom action.


Thanks
Kiran
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to insert this list into the combo box, you need to capture it in a file. For this you can use the following command in another custom action ("EXE with working DIR" for example):

Code: Select all

cmd /c "ListSQLSvr -s > "[TempFolder]file.txt""
This command will use the ListSQLSvr -s in the Command Interpreter (cmd) and redirect the output to a file (this is done by using the ">" character).

Now you can extract the data line by line from the resulted file and use it inside the custom action which populates the combo box.

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

Return to “Common Problems”