electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.67k stars 1.74k forks source link

NSIS: customUnInstall before files are deleted #6882

Open tortis opened 2 years ago

tortis commented 2 years ago

I've got a powershell script that does some uninstall cleanup, but if I try to execute it during customUnInstall the script as already been removed.

I found found in the templates that the uninstall macro is called after most of the install files have been deleted. https://github.com/electron-userland/electron-builder/blob/661a6522520e9ea59549cb7e18986fcfb58e873a/packages/app-builder-lib/templates/nsis/uninstaller.nsh#L114-L116

Would it make sense to add separate uninstall macro that runs before the bulk of the uninstall work? Or am I misguided, and I should just copy my powershell script somewhere that won't get removed automatically?

burgil commented 2 years ago

Hey, I recently discussed about uninstallers with someone, we talked about making custom uninstallers and I've found some resources on that here: https://github.com/electron-userland/electron-builder/issues/6927#issuecomment-1146872797

Good luck 👍