summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-04 17:59:15 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-04 17:59:15 (GMT)
commitddb36a57c5d641a36c5b11f4496aecf90c2ff2c0 (patch)
tree0ea45d860749c86a7e44a95fed91f23342cf4107 /Swift
parent48bd1cb6af499732d545199a5f45177537295017 (diff)
downloadswift-contrib-ddb36a57c5d641a36c5b11f4496aecf90c2ff2c0.zip
swift-contrib-ddb36a57c5d641a36c5b11f4496aecf90c2ff2c0.tar.bz2
Better clean up after uninstall
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Packaging/nsis/swift.nsi14
1 files changed, 10 insertions, 4 deletions
diff --git a/Swift/Packaging/nsis/swift.nsi b/Swift/Packaging/nsis/swift.nsi
index cb502ed..1d419a6 100644
--- a/Swift/Packaging/nsis/swift.nsi
+++ b/Swift/Packaging/nsis/swift.nsi
@@ -1,3 +1,6 @@
+# Ask to be an admin
+RequestExecutionLevel admin # Note - this doesn't mean you get it!
+
# Use the newer, nicer installer style
!include MUI2.nsh
@@ -62,6 +65,8 @@ File "..\..\QtUI\Swift\imageformats\qtiff4.dll"
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Swift.lnk" "$INSTDIR\Swift.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall Swift.lnk" "$INSTDIR\uninstaller.exe"
+# remember where we put them
+WriteRegStr HKCU "Software\Swift\" "Start Menu Folder" "$SMPROGRAMS\$StartMenuFolder"
# Add the information to Add/Remove
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Swift" "DisplayName" "Swift"
@@ -116,13 +121,14 @@ section "Uninstall"
delete $INSTDIR\imageformats\qsvg4.dll
delete $INSTDIR\imageformats\qtiff4.dll
+ RmDir $INSTDIR\Prerequisites
RmDir $INSTDIR\imageformats
RmDir $INSTDIR
-!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
- Delete "$SMPROGRAMS\$R0\Swift.lnk"
- Delete "$SMPROGRAMS\$R0\Uninstall Swift.lnk"
- RmDir "$SMPROGRAMS\$R0"
+ ReadRegStr $0 HKCU "Software\Swift\" "Start Menu Folder"
+ Delete "$0\Swift.lnk"
+ Delete "$0\Uninstall Swift.lnk"
+ RmDir "$0"
DeleteRegKey HKEY_CURRENT_USER "Software\Swift\Start Menu Folder"
DeleteRegKey /ifempty HKEY_CURRENT_USER "Software\Swift"