Skip to content

Commit

Permalink
fix(nsis): should close app when Silent and ONE_CLICK
Browse files Browse the repository at this point in the history
  • Loading branch information
lwintermelon committed Jul 26, 2021
1 parent 58770bb commit a5c6e40
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions packages/app-builder-lib/templates/nsis/uninstaller.nsh
@@ -1,13 +1,19 @@
Function un.checkAppRunning
!insertmacro CHECK_APP_RUNNING
FunctionEnd

Function un.onInit
!insertmacro check64BitAndSetRegView

${IfNot} ${Silent}
${If} ${Silent}

This comment has been minimized.

Copy link
@SchoberServices

SchoberServices Nov 9, 2022

This line caused a problem in our custom script. The commit message seems to aim to close app in case silent AND one_click. But seems to only check silent and not one_click. Now we have the problem that this change causes our custom silent updater script to close apps because customCheckApp running ist executed before $installMode ist populated. I would suggest that this line should additionally check if Not ONE_CLICK.

call un.checkAppRunning
${else}
!ifdef ONE_CLICK
MessageBox MB_OKCANCEL "$(areYouSureToUninstall)" IDOK +2
Quit

# one-click installer executes uninstall section in the silent mode, but we must show message dialog if silent mode was not explicitly set by user (using /S flag)
!insertmacro CHECK_APP_RUNNING
call un.checkAppRunning
SetSilent silent
!endif
${endIf}
Expand All @@ -20,9 +26,11 @@ Function un.onInit
FunctionEnd

Section "un.install"
# for assisted installer we check it here to show progress
!ifndef ONE_CLICK
# for assisted installer we check it here to show progress
!insertmacro CHECK_APP_RUNNING
${IfNot} ${Silent}
call un.checkAppRunning
${endIf}
!endif

!insertmacro setLinkVars
Expand Down

0 comments on commit a5c6e40

Please sign in to comment.