aleranza
Posts: 3
Joined: Thu Dec 28, 2017 12:12 pm

Silent setup, how to know if setup finished successfully or failed

Hi to all,

I need to know if the setup finished successfully or failed.
It is a silent setup msi, and I need to call a custom action in a .net dll that sends an e-mail with the result of setup (SUCCESS or FAILED).

Also, the setup has a cutom action to stop the Apache service when started, but I need to restart it at the end even if the setup complete successfully or failed.

Thanks in advance,
Alessandro
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Silent setup, how to know if setup finished successfully or failed

Hello Alessandro and welcome to our forums,

All you would need to do will be to schedule your .net dll custom action as a custom action with sequence after "Install Execution Stage -> Finish Execution" action stage. If the installation reached this stage this means it has succeeded so you can send a SUCCESS report.

To send a FAILURE report you should add another custom action scheduled "During installation rollback" as a custom action with sequence just after "Install Execution Stage -> Preparing" action group. When the installation fails it will rollback and thus this custom action will be triggered.

Finally to always restart the Apache service you should add two custom actions, configured to restart the service, configured like this:

1. the first action should be scheduled as a custom action with sequence after "Install Execution Stage -> Finish Execution" action stage (in case of a successful installation)
2. the second custom action should be scheduled "During installation rollback" as a custom action with sequence just before the custom action which stops the Apache service; in case the installation will fails after the Apache service is stopped the rollback action will be triggered

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
aleranza
Posts: 3
Joined: Thu Dec 28, 2017 12:12 pm

Re: Silent setup, how to know if setup finished successfully or failed

Thank you so much for your answer.
I'll try your solution as soon as possible and I'll let you know.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Silent setup, how to know if setup finished successfully or failed

You are always welcome.

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

Return to “Building Installers”