diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml index 76e561cd..bf7969ce 100644 --- a/.github/workflows/bundle.yml +++ b/.github/workflows/bundle.yml @@ -126,6 +126,8 @@ jobs: "keep the binaries out of the data folder" want '!define MAINBINARYNAME "cp-gui"' \ "keep cp-gui.exe, the program the startup entry and the shortcuts already point at" + want '${OrIf} $R0 <> 0 StrCpy $R1 "$R1 /UPDATE"' \ + "tell the old uninstaller it is an update, so an upgrade run by hand keeps the startup entry" want '!define HOMENAME "CopyPaste"' \ "keep the folders, keys and startup entry it has always had under CopyPaste" want '_is1" "UninstallString"' \ diff --git a/app/src-tauri/installer.nsi b/app/src-tauri/installer.nsi index c219b17d..6be9ac0e 100644 --- a/app/src-tauri/installer.nsi +++ b/app/src-tauri/installer.nsi @@ -356,7 +356,10 @@ Function PageLeaveReinstall ${Else} ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" "" ReadRegStr $R1 SHCTX "${UNINSTKEY}" "UninstallString" - ${IfThen} $UpdateMode = 1 ${|} StrCpy $R1 "$R1 /UPDATE" ${|} ; append /UPDATE + ${If} $UpdateMode = 1 + ${OrIf} $R0 <> 0 + StrCpy $R1 "$R1 /UPDATE" + ${EndIf} ${IfThen} $PassiveMode = 1 ${|} StrCpy $R1 "$R1 /P" ${|} ; append /P StrCpy $R1 "$R1 _?=$4" ; append uninstall directory ExecWait '$R1' $0