Run a script after a service starts - 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!

jetsmets
Posts: 6
Joined: Fri Dec 28, 2012 10:42 pm

Run a script after a service starts

I have a script I want to run once the service which i am installed and starting has started. How do I add that dependency? There does not seem to be anyway to add a custom action to start service, or a way to make the start of service happen at the beginning of the installation rather then at the end. Or is there a way to change the order which the things run. For example start all service, then run sql scripts. Rather then run sql script then start all services.

Thanks

Wayne
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Run a script after a service starts

Hello Wayne,

In order to achieve what you want you can schedule the "AI_SqlInstall" action after "InstallServices" and "StartServices" actions in the "InstallExecuteSequence" table. You can proceed like this:
- Go to "Table Editor" page and select the "InstallExecuteSequence" table.
- Set the "AI_SqlInstall" action sequence number to 5851 (just after the "StartServices" action which has a corresponding sequence number of 5850).
- Build and run your project.

Also, please keep in mind that our "Table Editor" feature is available only in an "Enterprise" or higher project type.

Let us know if this helps, otherwise give us more details about your scenario.

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

Return to “Common Problems”