pwr
Posts: 10
Joined: Mon Jul 25, 2011 9:49 am

uninstall problems

Hi!

I have three custom actions in InstallFinalize step in my installation. The custom actions is calling a DLL which performs the operations. When I uninstall my application I get an error message saying that the DLL used can't be found. It seems like the uninstallation sequence wants to use the DLL for some reason and it has been removed during the earlier uninstallation step. I haven't specified that the DLL should do anything during uninstallation. I might want to do some uninstallation operations with the DLL so the behaviour is a bit disturbing. But my guess is that Advanced Installer removes all the files before trying to run whatever it wants to run and that is why the DLL can't be found. It is copied and working during the installation of my application.

Where can I find information about how the uninstallation works and how AdvancedInstaller decides what should be run during a uninstallation? Is InstallFinalize also run during uninstallation?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: uninstall problems

Hello,

Almost all standard actions run during the uninstallation, including InstallFinalize. Here is an article that clarifies this.

In your case, to condition the custom action not to run during the uninstallation, but only during the first time install, you can set it with the following execution condition:

Code: Select all

NOT Installed
For a complete overview of how the standard and custom action work, I recommended you read the following article and its subarticles:
http://www.advancedinstaller.com/user-g ... tions.html

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pwr
Posts: 10
Joined: Mon Jul 25, 2011 9:49 am

Re: uninstall problems

Ok, so from what I understand from the articles. It's not possible to use the custom DLL action in a uninstallation. The DLL needs to be located somewhere on the computer in order to run it during the uninstallation. To prevent the custom action from being run during the uninstallation I need to define it in Install-sequence. But when install sequence is run I don't have the DLL copied to the target computer. So I guess I need to run the DLL from the source folder some how, if this is possible. Have I understood this correctly?

BR
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: uninstall problems

Hi,
It's not possible to use the custom DLL action in a uninstallation.
You can use DLL files as custom actions on uninstall, but before the files are remove, i.e. in the beginning of the uninstall process.

If you have custom actions under InstallFinalize, i.e. end of the process, you need to add the DLL as a "New Attached Custom Action". Only this way you can use it in any moment
of the install/uninstall process without depending on the state of the resources added in Files and Folders page.

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

Return to “Common Problems”