Custom actions do not execute on the ExitDialog dialog in AdvancedInstaller after .NET Framework prerequisite installation and reboot
When using AdvancedInstaller you may find that custom actions do not execute on the ExitDialog dialog (for example when you click a butto) after .NET Framework prerequisite installation and reboot.
The AdvancedInstaller installation will correctly continue after the .NET Framework installation reboot however the buttons on the exit page don't work.
For an Open URL action you can simply tick the "Wait for custom action to finish before proceeding" checkbox. The URL will actually open and the install continue as normal.
For an actual .exe file you need to find a way to create a custom action that executes the application. We found there were several ways to do this however each had issues
- Using VBScript to execute a file caused the file to execute behind the installer window
- Using an inline PowerShell script executes the application correctly in front of the installer window, however on some test machines this look several seconds before the application started
- You can also create your own application that essentially executes the "real" application without waiting and self terminates.
- Execute a batch file that runs a "start" command
- Configure your application with a silent restart switch
This is a bit of a strange solution but is actually simpler in terms of testing if you have control of your own application that your executing. The application starts and checks its command line parameters.
If a parameter "/silentrestart" is passed then the application terminates and restarts itself without the switch. The original process is therefore ended and the AdvancedInstaller/Windows installer is happy.
Comments
Post a Comment