Hi,
Thank you for your interest in Advanced Installer.
I want to run an application that will report the installation status (OK, Failed etc.) at the end of the installation.
I'm not sure why you need this. Please note that the installation process will automatically notify the user if the installation fails. Also, if the installation is successful, the "ExitDialog" dialog will be shown, letting the user know that there were no errors.
1) Where should I place the action, and what should be the execution conditions in order that it will run only at the last possible stage when the application is installed?
In order to execute the custom action in the final stage of the installation you can schedule it under the "InstallFinalize" standard action in the "Custom Actions" page. You can see "InstallFinalize" by using the "Show standard action" button on the toolbar.
Also, to make sure that the custom action will be executed only during the first installation you can set the "Expression" field in the "Custom Action Properties" page to:
NOT Installed.
2) How can I detect whether the installation completed successfully or failed (in order to pass the information to the reporting application)?
I'm afraid that this cannot be done directly because the installation process will return a code only after the Windows Installer process is terminated.
However, you can do what you need by using two custom actions:
- one scheduled under "Rollback" which will let the user know that there was an error and the installation failed
- the other scheduled under "Commit" which will let the user know that the installation was successful.
You can read more about custom actions here:
http://www.advancedinstaller.com/user-g ... -page.html
3) In case the installation failed, is there a simple way to retrieve the reason using some string property?
I'm afraid that this cannot be done because the installation errors are handled by Windows Installer.
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging