catsaremyfriends
Posts: 33
Joined: Thu Mar 26, 2009 9:21 pm

How do you remove a .NET DLL which contains a custom action?

I have implememented a custom action as a .Net DLL. And because .NET custom actions cannot be in temporary files, the DLL file with the custom action is installed along with the rest of the project files on the Target Computer.

Following the recomendation in the posting ".Net Custom Actions Using Temporary Files", found in the Feature Requests forum, I have implemented a File Removal Operation however my DLL file does not seem to get removed.

The name of my DLL file is "foo.dll" and I have set the New File Removal Dialog parameters to the following:

Name: foo.dll
Component: <one of the other files that is to be installed>
Remove on: Component Install

I have also tried setting Component to foo.dll and tried the other selections under Remove on . Nothing seems to work.

What am I doing wrong?

Thanks,

cats
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How do you remove a .NET DLL which contains a custom action?

Hi,

Please note that file removal operations run at the beginning of the install or uninstall process. Therefore, a file removal operation cannot be used to remove a file created by the same install process. It is recommended to leave the custom action DLL installed on the machine. However, if you want to delete it you can use a custom action. You can find some sample script code here.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”