Mercurial > trustbridge
comparison packaging/trustbridge.nsi @ 915:715d41aac9c8
(Issue85) Really move start menu entry to user context
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 20 Aug 2014 17:23:11 +0200 |
parents | a10eae8ca290 |
children | 6978381671eb |
comparison
equal
deleted
inserted
replaced
914:dcb6ed6ad594 | 915:715d41aac9c8 |
---|---|
78 Achtung: Dies ist eine Testversion!" | 78 Achtung: Dies ist eine Testversion!" |
79 | 79 |
80 !define MUI_FINISHPAGE_NOAUTOCLOSE | 80 !define MUI_FINISHPAGE_NOAUTOCLOSE |
81 !define MUI_UNFINISHPAGE_NOAUTOCLOSE | 81 !define MUI_UNFINISHPAGE_NOAUTOCLOSE |
82 | 82 |
83 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" | 83 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" |
84 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}" | 84 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${productname_short}" |
85 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" | 85 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" |
86 | 86 |
87 | 87 |
88 ;-------------------------------- | 88 ;-------------------------------- |
231 WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \ | 231 WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \ |
232 "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" | 232 "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" |
233 WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \ | 233 WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" \ |
234 "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" | 234 "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S" |
235 | 235 |
236 ; Below this is HKCU only! | |
237 SetShellVarContext current | |
236 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application | 238 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
237 | 239 |
238 ;Create shortcuts | 240 ;Create shortcuts |
239 CreateDirectory "$SMPROGRAMS\$StartMenuFolder" | 241 CreateDirectory "$SMPROGRAMS\$StartMenuFolder" |
240 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\trustbridge.exe" | 242 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" "$INSTDIR\trustbridge.exe" |
255 ; Delete "$INSTDIR\Uninstall.exe" | 257 ; Delete "$INSTDIR\Uninstall.exe" |
256 ; RMDir "$INSTDIR" | 258 ; RMDir "$INSTDIR" |
257 | 259 |
258 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder | 260 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder |
259 | 261 |
262 DeleteRegValue SHCTX "Software\${productname_short}" "Start Menu Folder" | |
263 | |
264 DeleteRegKey /ifempty SHCTX "Software\${productname_short}" | |
265 | |
266 ; Unregister autostart | |
267 DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Run" "TrustBridge" | |
268 | |
269 ; Unregister logging | |
270 DeleteRegKey SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" | |
271 | |
272 ; Remove uninstaller | |
273 DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" | |
274 | |
275 ; Below this is HKCU only! | |
276 SetShellVarContext current | |
277 | |
260 Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" | 278 Delete "$SMPROGRAMS\$StartMenuFolder\${productname}.lnk" |
261 RMDir "$SMPROGRAMS\$StartMenuFolder" | 279 RMDir "$SMPROGRAMS\$StartMenuFolder" |
262 | 280 |
263 DeleteRegKey /ifempty SHCTX "Software\${productname_short}" | |
264 | |
265 ; Unregister autostart | |
266 DeleteRegValue SHCTX "Software\Microsoft\Windows\CurrentVersion\Run" "TrustBridge" | |
267 | |
268 ; Unregister logging | |
269 DeleteRegKey SHCTX "System\CurrentControlSet\services\eventlog\Application\${productname_short}" | |
270 | |
271 ; Remove uninstaller | |
272 DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${productname_short}" | |
273 SectionEnd | 281 SectionEnd |
274 !endif | 282 !endif |