#14242 closed defect (fixed)
[Patch] Uninstaller is buggy in silent mode
Reported by: | IdealChain | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | 17.01 |
Component: | Installer Windows | Version: | tested |
Keywords: | nsis installer windows | Cc: |
Description
While creating a JOSM package for chocolatey, I noticed that the NSIS uninstaller for JOSM does not work properly when run in silent mode (/S flag): after deleting the josm-tested.jar file (successfully), an error level is still set, the "JOSM probably in use" message displayed and the uninstallation aborted.
I have tested the attached patch to work as intended for:
- Interactive uninstallation
- Silent uninstallation
- JOSM is still open, josm-tested.jar is blocked => uninstall is aborted
Attachments (1)
Change History (6)
by , 8 years ago
Attachment: | silent-uninstall-fix.patch added |
---|
follow-up: 2 comment:1 by , 8 years ago
comment:2 by , 8 years ago
Replying to bastiK:
Thanks for reporting, but just discarding any error messages is not a proper fix of the problem.
In uninstall mode I have no problem with this. You anyway can't do much if it fails.
comment:3 by , 8 years ago
Thanks for having a look. Please note that the "Josm in use error" is not discarded - it will still be shown in case the josm-tested.jar file could not be deleted successfully. I merely fixed the test to not be affected by earlier stuff, as is suggested here by the NSIS reference.
The "directory could not be removed" warning I decided to suppress in silent mode. In my opinion, it is not important enough to require interactivity (and hang the installer) in a silent uninstall (also, if you want to wait for the NSIS uninstaller to complete, you have to run it in place instead of letting it copy itself to temp, which triggers the warning).
Thanks for reporting, but just discarding any error messages is not a proper fix of the problem.