tom5870
Posts: 7
Joined: Wed Jul 26, 2017 4:00 pm

NetInstaller class custom action

Thu May 13, 2021 7:17 pm

I have .NET service which has an installer class. I can use the InstallUtil command line utility to install/uninstall it just fine. If use the custom action for NetInstaller, it installs just fine. However, when the program is uninstalled get an error that it can't find the Assembly EXE. I figure maybe I need to change the execution time for uninstalls, but I can't rename the actions and it still did not seem to work I used immediatly for the uninstall.

Any help?

Catalin
Posts: 4330
Joined: Wed Jun 13, 2018 7:49 am

Re: NetInstaller class custom action

Tue May 18, 2021 1:50 pm

Hello Tom,

As you have mentioned, this looks to be a sequence issue. Most likely, your EXE is removed from the machine when the custom action is executed.

The custom action should have been scheduled somewhere before the "Remove Resources" action group (during this, the actions that remove the files are executed).

If you can not remove the installation from your machine, please proceed as explained in the following FAQ:

How do I remove a broken installation?

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

tom5870
Posts: 7
Joined: Wed Jul 26, 2017 4:00 pm

Re: NetInstaller class custom action

Tue May 18, 2021 2:07 pm

That helped. Be nice if you could rename those actions so it is obvious which is the install vs. the uninstall.

Catalin
Posts: 4330
Joined: Wed Jun 13, 2018 7:49 am

Re: NetInstaller class custom action

Tue May 18, 2021 8:24 pm

Hello,

Thank you for your followup on this!

I am glad it helped!
Be nice if you could rename those actions so it is obvious which is the install vs. the uninstall.
Please note that most of those actions are proprietary to Windows Installer. We have created the action groups (e.g. "Add resources", "Remove resources" just for this purpose - i.e. so it's clearer what actions are executed and when).

For instance, most of the actions from under the "Remove resources" are executed during an uninstall. They are also executed during an upgrade (since an upgrade consists of the uninstall of the older version and the install of the newer version) and so on.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”