jm2008
Posts: 62
Joined: Tue Jul 08, 2008 10:24 am

Error message

Hi,

I have set custom action --> error message on uninstallation.

When I try to uninstall from Control panel after displaying the custom action error message I get another error message:

Fatal error during installation

Any idea what might be wrong?

Thanks,
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Error message

Hello,

Please note that the Error Message custom action is returning an ERROR_INSTALL_FAILURE error code, thus Windows Installer cancels the installation. In order to display a message without canceling the installation you can use a "Script Inline" Custom Action like this:

Code: Select all

MsgBox Session.Property("APPDIR")
The example above displays a message box with the value of APPDIR.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jm2008
Posts: 62
Joined: Tue Jul 08, 2008 10:24 am

Re: Error message

I think I need to clear it.

I do want to stop the installer using the error message, there is no problem with this. The problem is after the error message displayed and Advanced Installer Dialog box displayed. there will be one more error message /Windows error message/ says: Fatal error during installation
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Error message

Hello,

Unfortunately that message is not part of Windows Installer, it is part of the Add/Remove programs interface and thus can not be controlled. An alternative to avoid this is to write your own custom action that displays your error message, then return ERROR_INSTALL_USEREXIT. Upon receiving this error code, Add/Remove programs does not display that error message anymore.
For more details about custom action return values you can check this link.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”