Skip to content

Commit

Permalink
Delete old Start Menu shortcuts when updating
Browse files Browse the repository at this point in the history
Both installer and uninstaller (just in case) remove old Start Menu shortcuts if they exist, so that there are no files left behind and the transition to the new shortcut is smooth when updating.
  • Loading branch information
RedBlackAka authored Nov 7, 2024
1 parent 36ab58f commit af193f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extra/nsis/mp-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ Section "OBS Studio" SecCore

SetOutPath "$INSTDIR\bin\64bit"
CreateShortCut "$SMPROGRAMS\OBS Studio.lnk" "$INSTDIR\bin\64bit\obs64.exe"

; Delete old Start Menu shortcuts if installing upon an older version
Delete "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"
Delete "$SMPROGRAMS\OBS Studio\Uninstall.lnk"
RMDir "$SMPROGRAMS\OBS Studio"
SectionEnd

Section -FinishSection
Expand Down Expand Up @@ -409,7 +414,9 @@ Section "un.${APPNAME} App Files" UninstallSection1
SetShellVarContext all
Delete "$DESKTOP\OBS Studio.lnk"
Delete "$SMPROGRAMS\OBS Studio\OBS Studio (32bit).lnk"
Delete "$SMPROGRAMS\OBS Studio\Uninstall.lnk"
${if} ${RunningX64}
Delete "$SMPROGRAMS\OBS Studio\OBS Studio (64bit).lnk"
Delete "$SMPROGRAMS\OBS Studio.lnk"
${endif}
SetShellVarContext current
Expand Down

0 comments on commit af193f5

Please sign in to comment.