mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-11 23:07:23 +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
|
||||
|
||||
!macro PromptForRunningApplication applicationName displayName action prompter
|
||||
${nsProcess::FindProcess} ${applicationName} $R0
|
||||
!define UniqueID ${__LINE__}
|
||||
|
||||
${If} $R0 == 0
|
||||
; the process is running, ask the user if they want us to close it
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION \
|
||||
"${displayName} cannot be ${action} while ${displayName} is running.$\r$\nPlease close it and try again."
|
||||
Abort
|
||||
${EndIf}
|
||||
Prompt_${UniqueID}:
|
||||
|
||||
${nsProcess::FindProcess} ${applicationName} $R0
|
||||
|
||||
${If} $R0 == 0
|
||||
|
||||
; 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
|
||||
|
||||
!macro CheckForRunningApplications action prompter
|
||||
|
|
Loading…
Reference in a new issue