File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1919!macro customInit
2020 ; Check if Vayu is running
2121 nsExec::ExecToStack ' tasklist /FI "IMAGENAME eq Vayu.exe" /NH'
22- Pop $0
23- Pop $1
22+ Pop $0 ; Exit code
23+ Pop $1 ; Output
2424
25- ; Check if the output contains "Vayu.exe" (means it's running)
26- ${If} $1 != " "
27- ${AndIf} $1 != " INFO: No tasks are running which match the specified criteria."
25+ ; Check if the output actually contains "Vayu.exe" (means it's running)
26+ ; When tasklist finds the process, output starts with "Vayu.exe"
27+ ; When not found, output is empty or contains "INFO: No tasks..."
28+ ; We check if output starts with "Vayu.exe" (first 8 chars) to avoid locale issues
29+ StrCpy $2 $1 8 ; Extract first 8 characters
30+ ${If} $2 == " Vayu.exe"
31+ ; Vayu.exe is running
2832 MessageBox MB_OKCANCEL |MB_ICONINFORMATION \
2933 " Vayu is currently running.$\n$\n Click OK to close it and continue installation, or Cancel to abort." \
3034 IDOK closeApp IDCANCEL abortInstall
You can’t perform that action at this time.
0 commit comments