Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nsis): should close app when Silent and ONE_CLICK #6100

Merged
merged 1 commit into from Jul 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}
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