[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

HowTo? Run A Custom Action Just After Uninstallation Begins

joey.powell

8/11/2008 3:48:00 PM

Hello guys, I need to be able to fire off a custom action as soon as
the user begins an uninstall (before files are deleted, etc...).
VS2008 shows four options to choose from..."Install", "Commit",
"Rollback" and "Uninstall". Unfortunately custom actions in the
"Uninstall" phase do not fire until AFTER the uninstall has completed
(according to Microsoft's documentation). So, how does one get a
custom action to fire just BEFORE the uninstall?
2 Answers

hcurrie

8/12/2008 10:32:00 AM

0


> Unfortunately custom actions in the
> "Uninstall" phase do not fire until AFTER the uninstall has completed
> (according to Microsoft's documentation).

Are you sure?
The only reference I could find in the help file is this:

Uninstall
Custom actions placed under this node will be executed at the end of the
uninstall phase of installation, which occurs when an application is
uninstalled.

This is extremely badly worded and ambiguous. It does seem to imply that the
custom action is performed after the uninstallation, but I'm not sure if
that is what was intended by the 'author'. Have you tried it? I would be
very surprised if the custom action were to execute after the files were
deleted. If you are using an installer class, the DLL containing this must
still be available for it to call into, so clearly it cannot have been
deleted yet.



joey.powell

8/13/2008 3:53:00 PM

0

On Aug 12, 5:31 am, "Phil" <N/A> wrote:
> > Unfortunately custom actions in the
> > "Uninstall" phase do not fire until AFTER the uninstall has completed
> > (according to Microsoft's documentation).
>
> Are you sure?
> The only reference I could find in the help file is this:
>
> Uninstall
>     Custom actions placed under this node will be executed at the end of the
> uninstall phase of installation, which occurs when an application is
> uninstalled.
>
> This is extremely badly worded and ambiguous. It does seem to imply that the
> custom action is performed after the uninstallation, but I'm not sure if
> that is what was intended by the 'author'. Have you tried it? I would be
> very surprised if the custom action were to execute after the files were
> deleted. If you are using an installer class, the DLL containing this must
> still be available for it to call into, so clearly it cannot have been
> deleted yet.

You were right. It is extremely badly worded. The CA gets called at
the beginning of the uninstall phase and not at the end.