datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Add Windows uninstaller #326

Open adswa opened 1 year ago

adswa commented 1 year ago

I believe we should add an uninstaller to the Windows installer to make uninstalling easily possible. Otherwise, we would need a section in the docs detailing the steps to figure out where the installed files lie, which is cumbersome, more error-prone, and not very Windows-like.

The nullsoft documentation says

A special Section named 'Uninstall' must be created in order to generate an uninstaller. This section should remove all files, registry keys etc etc that were installed by the installer, from the system.

I suspect that a minimal uninstaller like the one below could already be enough:

Section "Uninstall"
   Delete $INSTDIR\Uninst.exe ; delete self 
   RMDir $INSTDIR
SectionEnd

It would - if I see it correctly - remove %LOCALAPPDATA%\datalad.org\datalad-gooey. It would not touch a git or git-annex installation, which I believe is a sane thing to do. The example online also has the line

DeleteRegKey HKLM SOFTWARE\myApp

But looking at the nsi file and confirming in the registry on a Windows computer after a gooey installation it does not seem like the installer adds a key into the registry.

christian-monch commented 1 year ago

Good idea @adswa Thx. The uninstaller should also delete the shortcut that the installer puts into the desktop

christian-monch commented 1 year ago

A DeleteRegKey is currently not required, since we do not add any keys to the registry