diff packaging/trustbridge.nsi @ 794:fdc15f0cfdd8

(issue61) NSIS Write uninstall information and make URL configurable.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Jul 2014 12:03:45 +0200
parents 6bb769d3cdc1
children 71799e101755
line wrap: on
line diff
--- a/packaging/trustbridge.nsi	Tue Jul 15 10:42:36 2014 +0200
+++ b/packaging/trustbridge.nsi	Tue Jul 15 12:03:45 2014 +0200
@@ -90,8 +90,8 @@
 ;!define MUI_FINISHPAGE_RUN $INSTDIR\trustbridge.exe
 ;!define MUI_FINISHPAGE_RUN_TEXT "Anwendung starten"
 ;!define MUI_FINISHPAGE_RUN_FUNCTION RunAsUser
-!define MUI_FINISHPAGE_LINK "Mehr unter http://www.bsi.bund.de" 
-!define MUI_FINISHPAGE_LINK_LOCATION "http://www.bsi.bund.de"
+!define MUI_FINISHPAGE_LINK "Mehr unter ${info_url}"
+!define MUI_FINISHPAGE_LINK_LOCATION "${info_url}"
 
 !insertmacro MUI_PAGE_WELCOME
 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
@@ -166,6 +166,27 @@
   WriteRegDword SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "TypesSupported" 5
   WriteRegDword SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" "CategoryCount" 3
 
+; Register Uninstaller
+
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "DisplayName" "${productname}"
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "DisplayIcon" "$\"$INSTDIR\trustbridge.exe$\""
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "DisplayVersion" "${version_number}"
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "Publisher" "${company}"
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "URLInfoAbout" "${info_url}"
+  WriteRegDword SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "EstimatedSize" "${size}"
+
+
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                   "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
+  WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \
+                 "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
+
   !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
 
   ;Create shortcuts
@@ -190,4 +211,9 @@
 
   DeleteRegKey /ifempty SHCTX "Software\${productname_short}"
 
+; Unregister logging
+  DeleteRegKey SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" 
+
+; Remove uninstaller
+  DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}"
 SectionEnd

http://wald.intevation.org/projects/trustbridge/