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!

Michael D
Posts: 11
Joined: Mon Oct 29, 2012 9:42 pm

Re: SQLCMD custom action problems

Hello Mihai:

I tried it and it still fails. I changed the Condition for both the config and the start commands from 1 to AI_INSTALL, and now I can see that they're both getting executed. The SQLBrowser service is eventually getting started, but the installer doesn't wait for the commands to finish before continuing on to the SQLConnectionDlg. Because of that, the SQLServer that I'm looking for doesn't show up in the list of browseable SQL Servers.

Any ideas?
Michael D
Posts: 11
Joined: Mon Oct 29, 2012 9:42 pm

Re: SQLCMD custom action problems

Hi Mihai:

I renamed the first call to LaunchFileAsAdmin_1:

Code: Select all

/RunAsAdmin sc config SQLBrowser start= auto
and moved it to be an InitEvent for the FolderDlg instead of for the SQLConnectionDlg, hoping that by the time the latter dialog appears, the InitEvent for the former will have completed. It seems to get kicked off ok as it is set as Synchronous execution, check return code, and no error pops up. The second call is also set as Synchronous execution, check return code, and launches without error, but the server doesn't show up in the list.

I am really stuck.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: SQLCMD custom action problems

Hello Michael,

Indeed after further analysis it seems you cannot start the service as part of the installation process because as your testing proved, it takes too long.
In this case, the only solution is to change the browsing method(SqlServerBrowseMethod property) to "1 - Windows Network Manager API" as described in the How to browse for SQL Servers on the network? article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Michael D
Posts: 11
Joined: Mon Oct 29, 2012 9:42 pm

Re: SQLCMD custom action problems

Hi Mihai:

That relies on the SQLBrowse service to be running, which is the issue I'm having: when it's not running, I can't start it in a timely manner. I guess I'll just explain the issue to the end user if a prior SQL Server or SQLExpress installation is detected.

Thanks for your help,
Michael

Return to “Building Installers”