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!

Iron_Chef
Posts: 6
Joined: Thu Apr 12, 2007 12:49 am

Uninstall Custom Action not working

Hi there,

In my latest project I have created an executable to run at install and backup some files to another folder before installing the application.

This part works fine.

I have also made an executable (restore.exe) that is installed and run on uninstall to copy the backup files back. I have tried setting this as permanent so it remains but it still does not seem to do anything.
The application is uninstalled and I am left with the backup sub-folder with the files in it and none have been copied back to the [APPDIR].

Where should I put this in the custom action area and what settings should I use to make sure it runs AFTER the application files are uninstalled? It needs to be the last thing to happen in the process.

Thanks

Iron Chef
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Iron,

My suggestion is to scheduled the custom action that makes the backup as "New Attached Custom Action" under "InstallExecuteSequence->CostFinalize". Use "Show Standard Action" toolbar menu to make standard actions visible.

For the custom action that makes the restore choose "New Attached Custom Action" under "InstallExecuteSequence->InstallFinalize" and browse for the restore.exe file.

"New Attached Custom Action" stores the EXE file in the MSI database (binary table) and will not be installed in your application folder.

For a similar approach please see our tutorial:
http://www.advancedinstaller.com/user-g ... le-ca.html

Hope this helps.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Iron_Chef
Posts: 6
Joined: Thu Apr 12, 2007 12:49 am

Hi Gigi,

I think I confused you with my first post.

I don't wish to restore files from a previous version of my package - I wish to restore original files from the PC which my package modifies.

The same sort of requirement as in this post I just found..

http://www.advancedinstaller.com/forums ... ght=backup


I did take your advice on the backup part...
My suggestion is to scheduled the custom action that makes the backup as "New Attached Custom Action" under "InstallExecuteSequence->CostFinalize". Use "Show Standard Action" toolbar menu to make standard actions visible.
This worked well for the Backup.

For the Restore, I placed the restore.exe as a "New Attached Custom Action" under the "Uninstall" section of custom actions.

The only difficulty I had was with understanding the sequence of events that happen during an uninstall process - so I was not sure what execution action to use.

Eventually found that "Commit" allowed my executable to operate correctly.

Thanks for the help.

Iron Chef

Return to “Common Problems”