mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-06 23:19:57 +01:00
installer: Clean up Windows Start Menu entry
* Clean up Windows Start Menu entry * Clean up old Start Menu shortcuts when upgrading
This commit is contained in:
parent
b225e856df
commit
9763488577
@ -160,9 +160,10 @@ Section "Base"
|
||||
!insertmacro UPDATE_DISPLAYNAME
|
||||
|
||||
; Create start menu and desktop shortcuts
|
||||
; This needs to be done after azahar.exe is copied
|
||||
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\$DisplayName.lnk" "$INSTDIR\azahar.exe"
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\$DisplayName.lnk"
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall $DisplayName.lnk"
|
||||
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\$DisplayName.lnk" "$INSTDIR\azahar.exe"
|
||||
${If} $DesktopShortcut == 1
|
||||
CreateShortCut "$DESKTOP\$DisplayName.lnk" "$INSTDIR\azahar.exe"
|
||||
${EndIf}
|
||||
@ -171,11 +172,6 @@ Section "Base"
|
||||
SetOutPath "$TEMP"
|
||||
SectionEnd
|
||||
|
||||
Section -AdditionalIcons
|
||||
; Create start menu shortcut for the uninstaller
|
||||
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall $DisplayName.lnk" "$INSTDIR\uninst.exe" "/$MultiUser.InstallMode"
|
||||
SectionEnd
|
||||
|
||||
!include "FileFunc.nsh"
|
||||
|
||||
Section -Post
|
||||
@ -200,10 +196,11 @@ SectionEnd
|
||||
Section Uninstall
|
||||
!insertmacro UPDATE_DISPLAYNAME
|
||||
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall $DisplayName.lnk"
|
||||
|
||||
Delete "$DESKTOP\$DisplayName.lnk"
|
||||
Delete "$SMPROGRAMS\$DisplayName.lnk"
|
||||
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\$DisplayName.lnk"
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall $DisplayName.lnk"
|
||||
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
|
||||
|
||||
; Be a bit careful to not delete files a user may have put into the install directory.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user