mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:57:58 +02:00
allow user to close running exec and continue
This commit is contained in:
parent
aa2d19a611
commit
150a8d388c
1 changed files with 18 additions and 7 deletions
|
@ -682,14 +682,25 @@ FunctionEnd
|
||||||
!include nsProcess.nsh
|
!include nsProcess.nsh
|
||||||
|
|
||||||
!macro PromptForRunningApplication applicationName displayName action prompter
|
!macro PromptForRunningApplication applicationName displayName action prompter
|
||||||
${nsProcess::FindProcess} ${applicationName} $R0
|
!define UniqueID ${__LINE__}
|
||||||
|
|
||||||
${If} $R0 == 0
|
Prompt_${UniqueID}:
|
||||||
; the process is running, ask the user if they want us to close it
|
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION \
|
${nsProcess::FindProcess} ${applicationName} $R0
|
||||||
"${displayName} cannot be ${action} while ${displayName} is running.$\r$\nPlease close it and try again."
|
|
||||||
Abort
|
${If} $R0 == 0
|
||||||
${EndIf}
|
|
||||||
|
; the process is running, ask the user to close it
|
||||||
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION \
|
||||||
|
"${displayName} cannot be ${action} while ${displayName} is running.$\r$\nPlease close it to continue." \
|
||||||
|
/SD IDCANCEL IDRETRY Prompt_${UniqueID} IDCANCEL 0
|
||||||
|
|
||||||
|
; If the user decided to cancel, stop the current installer/uninstaller
|
||||||
|
Abort
|
||||||
|
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
!undef UniqueID
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
!macro CheckForRunningApplications action prompter
|
!macro CheckForRunningApplications action prompter
|
||||||
|
|
Loading…
Reference in a new issue