summaryrefslogtreecommitdiff
path: root/distribution/win32/nsis/uninstall.nsh
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
commite50482f994b6ebcce864a412111d376e99205cdb (patch)
treeff3192c6aaf213c4922521bed988e4ed4147f537 /distribution/win32/nsis/uninstall.nsh
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1' with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
Diffstat (limited to 'distribution/win32/nsis/uninstall.nsh')
-rw-r--r--distribution/win32/nsis/uninstall.nsh29
1 files changed, 20 insertions, 9 deletions
diff --git a/distribution/win32/nsis/uninstall.nsh b/distribution/win32/nsis/uninstall.nsh
index b568e21..3f47586 100644
--- a/distribution/win32/nsis/uninstall.nsh
+++ b/distribution/win32/nsis/uninstall.nsh
@@ -1,8 +1,8 @@
;
-; additional uninstaller instructions
+; additional uninstaller instructions
;
-; Remove file association
+; Remove file association xtc
!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".xtc" ""
StrCmp $1 "XTrackCAD.Design" 0 "${Index}-NoOwn" ; only do this if we own it
@@ -13,18 +13,29 @@
"${Index}-Restore:"
WriteRegStr HKCR ".xtc" "" $1
DeleteRegValue HKCR ".xtc" "backup_val"
-
+
+"${Index}-NoOwn:"
+; Remove file association xtce
+ !define /redef Index "Line${__LINE__}"
+ ReadRegStr $1 HKCR ".xtce" ""
+ StrCmp $1 "XTrackCAD.Design" 0 "${Index}-NoOwn" ; only do this if we own it
+ ReadRegStr $1 HKCR ".xtce" "backup_xtce"
+ StrCmp $1 "" 0 "${Index}-Restore" ; if backup="" then delete the whole key
+ DeleteRegKey HKCR ".xtce"
+ Goto "${Index}-NoOwn"
+ "${Index}-Restore:"
+ WriteRegStr HKCR ".xtce" "" $1
+ DeleteRegValue HKCR ".xtce" "backup_xtce"
+
DeleteRegKey HKCR "XTrackCAD.Design" ;Delete key with association settings
-
+
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
"${Index}-NoOwn:"
!undef Index
; Remove shortcuts, if any
-; SetShellVarContext all
+SetShellVarContext all
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
-Delete "$SMPROGRAMS\$MUI_TEMP\XTrkCad Help.lnk"
-Delete "$SMPROGRAMS\$MUI_TEMP\XTrkCad ReadMe.lnk"
- \ No newline at end of file
+RMDir /r "$SMPROGRAMS\$MUI_TEMP"
+Delete "$desktop\XTrackCAD.lnk"