Page MenuHome GnuPG

`gpg4win-uninstall.exe /S`doesn't remove itself and leaves an empty directory
Closed, ResolvedPublic

Description

when run remotely, gpg4win-uninstall.exe /S sucessfully uninstalls all components, but leaves two things behind:

  • the empty directory GnuPG/shared/doc
  • itself at Gpg4win/gpg4win-uninstall.exe

when the uninstaller is run in GUI mode, gpg4win-uninstall.exe is being removed, but the empty doc directory is also present.

Details

Version
4.4.0

Revisions and Commits

Event Timeline

Fixed with rG4c830b240c for gpd5 but after the release. Will fix it for 2.4 too.

Also fixed for 2.4. Don't use the uninstaller on the command line, you should use the Windows method to do this.

werner claimed this task.

Just to explain, if you are executing it from the command line the command line will "lock" the uninstaller until it is finished. In GUI Mode it creates a copy in %TEMP% launches this copy and exits. When run from the command line it requires a session reset to delete the unistaller. So log out / log in and the uninstaller should be removed, but the dir might still exist. I am not sure. To workaround you need to copy the uninstaller to a temporary locationm firs and then execute and delete the copy.

To workaround you need to copy the uninstaller to a temporary locationm firs and then execute and delete the copy.

thanks for explaining what is happening and why, working with a temporary copy did the trick.

this could also help with T5952, i was testing with ansible as well.

In T7452#195841, @m.eik wrote:

this could also help with T5952, i was testing with ansible as well.

I doubt it as what Gpg4win does here is completely standard. So the win_package module should handle it or there would be multiple results if you search for "NSIS uninstall ansible"