summaryrefslogtreecommitdiff
path: root/nasm.nsi
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2011-07-15 22:38:47 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2011-07-15 22:38:47 +0400
commitee42e62c7ca23e94ffd6161254e4fb7b4932db07 (patch)
tree19f2b86fdb2c8d27f2716f0be1068c2694f74687 /nasm.nsi
parent9f0dcfc724bd23aa39b90bdb0c12e8f036621a16 (diff)
downloadnasm-ee42e62c7ca23e94ffd6161254e4fb7b4932db07.tar.gz
nasm-ee42e62c7ca23e94ffd6161254e4fb7b4932db07.tar.bz2
nasm-ee42e62c7ca23e94ffd6161254e4fb7b4932db07.zip
nsis: Inform a user about files being deleted
Since a user might have some weird access rules on NTFS such as allow to write files but not to delete them it might happen that uninstallation procedure fails at deleting files but deleting registry keys still success, and in result a user might try to uninstall nasm for second time with registry keys corrupted. So prompt a user with files being deleted so he can double check what is going on. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'nasm.nsi')
-rw-r--r--nasm.nsi15
1 files changed, 10 insertions, 5 deletions
diff --git a/nasm.nsi b/nasm.nsi
index 3801d19..bcab04f 100644
--- a/nasm.nsi
+++ b/nasm.nsi
@@ -186,7 +186,10 @@ Section "Uninstall"
IfFileExists "$INSTDIR" +3 +1
MessageBox MB_OK "No files found, aborting."
Abort
- RMDir /r /rebootok "$INSTDIR"
+ MessageBox MB_YESNO "The following directory will be deleted$\n$INSTDIR" IDYES rm_instdir_true IDNO rm_instdir_false
+ rm_instdir_true:
+ RMDir /r /rebootok "$INSTDIR"
+ rm_instdir_false:
;
; Links
Delete /rebootok "$DESKTOP\${PRODUCT_SHORT_NAME}.lnk"
@@ -199,10 +202,12 @@ Section "Uninstall"
IfFileExists $0 +3 +1
MessageBox MB_OK "No lnk files found, aborting."
Abort
- RMDir /r /rebootok "$INSTDIR"
- Delete /rebootok "$0\*"
- RMDir "$0"
- DeleteRegKey /ifempty HKCU "Software\${PRODUCT_SHORT_NAME}"
+ MessageBox MB_YESNO "The following directory will be deleted$\n$0" IDYES rm_links_true IDNO rm_links_false
+ rm_links_true:
+ Delete /rebootok "$0\*"
+ RMDir "$0"
+ rm_links_false:
+ DeleteRegKey /ifempty HKCU "Software\${PRODUCT_SHORT_NAME}"
SectionEnd
;