Custom action for uninstall failed - 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!

97itr217
Posts: 4
Joined: Wed Jul 07, 2010 8:24 pm

Custom action for uninstall failed

I wanted to have a custom action for uninstall. The action is to run a batch file which invoke MySQL to drop my database schema. I have verified that the batch file can be run successfully by itself (double clicking it).
However when I wire up a custom action for uninstall (used EXE with working Dir to run the batch file), the install runs for a bit and display a dialog with the following message:
"There is a problem with this windows installer package. A program required for this install to run cannot be complete..."
Did I do anything wrong? I am using AI version 7.5.1
Thanks
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom action for uninstall failed

Hi,

This error message appears when a custom action fails to run correctly. In your case because you are trying to run a batch file with a custom action
that expects to launch an EXE file, not .BAT.

To launch a batch file you can use a Launch File or Open URL custom action, as in the following example.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
97itr217
Posts: 4
Joined: Wed Jul 07, 2010 8:24 pm

Re: Custom action for uninstall failed

Thanks for the advice.
I tried your suggestion (have to use a wizard to add Launch File custom action) but it still results in an error dialog. Below is a screen print of the custom action.
uninstallaction.JPG
uninstallaction.JPG (139.06 KiB) Viewed 4139 times
In fact I wonder if Launch File custom action works.
I also have a custom action for Install using the same "EXE with working Dir" option to launch a bat file, which is working properly. If I follow replace it with a Launch File option (since you suggested that I should have used the Launch File option), the installation ends with the same error dialog (ie: bat file not launch and install ends with "there was a problem...." dialog box).
What gives?
Last edited by 97itr217 on Thu Jul 08, 2010 4:33 pm, edited 1 time in total.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom action for uninstall failed

Hi,

Can you please set the custom action to run as "Deferred with no impersonation", also set the name of the batch file between quotes, like this:

Code: Select all

"[#RemoveFiles.bat]"
If the problem persists please create a verbose log and send it to support at advancedinstaller dot com.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
97itr217
Posts: 4
Joined: Wed Jul 07, 2010 8:24 pm

Re: Custom action for uninstall failed

Just tried uninstall again but it still fails.
Verbose log file has been sent to support, also attached here.

About my custom action for install, I tried your suggestion to wrap double quote around the batch file. It works. So one problem down.
Attachments
uninstall.log
(173.7 KiB) Downloaded 262 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom action for uninstall failed

Hi,

It seems the batch file is not available when the custom action calls it, can you please add it as a temporary file in the Files and Folders page and then go to Custom Actions page and update its reference in the custom action using the file picker?

If the problem still persists please send me the new aip file and the verbose log.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”