Skip to content

Commit

Permalink
Remove start menu launcher while uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
slgobinath committed Jan 22, 2018
1 parent 08ce26d commit 48b2a01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.7z
11 changes: 7 additions & 4 deletions uget-windows-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ ${Index_RemoveFilesAndSubDirs}-done:
!define _VERSION "2.2.0"
!define _RELEASE "0"
!define _COMPANY "uGetdm.com"
!define _DESCRIPTION "#1 Open Source Download Manager"

;Name and file
Name "${_APPLICATION_NAME}"
Expand Down Expand Up @@ -194,7 +195,7 @@ ${Index_RemoveFilesAndSubDirs}-done:
VIProductVersion "${_VERSION}.${_RELEASE}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${_APPLICATION_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "#1 Open Source Download Manager"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${_DESCRIPTION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${_COMPANY}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright 2018 ${_COMPANY}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${_APPLICATION_NAME} Installer"
Expand All @@ -219,9 +220,8 @@ Section "uGet (required)"
; Put the icon
File "resource\icon.ico"

createDirectory "$SMPROGRAMS\${_APPLICATION_NAME}"
createShortCut "$SMPROGRAMS\${_APPLICATION_NAME}\${_APPLICATION_NAME}.lnk" "$INSTDIR\bin\uget.exe" "" "$INSTDIR\icon.ico"

; Create Start Menu launcher
createShortCut "$SMPROGRAMS\${_APPLICATION_NAME}.lnk" "$INSTDIR\bin\uget.exe" "" "$INSTDIR\icon.ico"

; Write the installation path into the registry
WriteRegStr HKLM "SOFTWARE\${_APPLICATION_NAME}" "Install_Dir" "$INSTDIR"
Expand Down Expand Up @@ -250,6 +250,9 @@ SectionEnd

Section "Uninstall"

# Remove Start Menu launcher
Delete "$SMPROGRAMS\${_APPLICATION_NAME}.lnk"

; Remove registry keys
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\uget.exe"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${_APPLICATION_NAME}"
Expand Down

0 comments on commit 48b2a01

Please sign in to comment.