postgre sql script execution - Advanced Installer Community

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!

tolo1984
Posts: 34
Joined: Tue Jul 26, 2011 9:47 am

postgre sql script execution

We're following these steps to install a postgre server:

1- Prerequisite -> postgre odbc
2- Custom Action -> Run initdb
3- Install and start service (pg_ctl.exe)
4- Launch SQL script in order to initialize database and tables



The problem is that, again, the order of execution in Windows Installer doesn't seem to help us.

And SQL scripts seem to be launched BEFORE Services initializization and starting.
So they fail.

Is there a way to change this?

We know we could make another custom action to manually perform one of those tasks at the proper moment.

But we would like to rely on advanced installer UI and Windows installer for those things ( Services..., SQL scripts...)
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: postgre sql script execution

Simply go to "Table Editor" page, in "InstallExecuteSequence" table and modify the sequence number of the action "AI_SqlInstall" so that it gets scheduled to
execute after the standard action "StartServices". Also, make sure you don't set it with a sequence number that is already used by another action.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tolo1984
Posts: 34
Joined: Tue Jul 26, 2011 9:47 am

Re: postgre sql script execution

Ups!!!


So we have all that flexibility !!

cool

Thank you very much, Bogdan.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: postgre sql script execution

You're welcome. Not all standard actions should be moved, but in this case its safe to move the one that handles the execution of the SQL scripts.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”