File tree 2 files changed +8
-3
lines changed
packages/app-builder-lib/templates/nsis/include
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " app-builder-lib " : patch
3
+ ---
4
+
5
+ fix: execute %SYSTEMROOT% cmd.exe directly during NSIS installer
Original file line number Diff line number Diff line change 42
42
${nsProcess::FindProcess } " ${_FILE}" ${_ERR}
43
43
!else
44
44
# find process owned by current user
45
- nsExec::Exec ` cmd /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" /FO csv | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
45
+ nsExec::Exec ` %SYSTEMROOT%\System32\ cmd.exe /c tasklist /FI "USERNAME eq %USERNAME%" /FI "IMAGENAME eq ${_FILE}" /FO csv | %SYSTEMROOT%\System32\find.exe "${_FILE}"`
46
46
Pop ${_ERR}
47
47
!endif
48
48
!macroend
73
73
!ifdef INSTALL_MODE_PER_ALL_USERS
74
74
nsExec::Exec ` taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
75
75
!else
76
- nsExec::Exec ` cmd /c taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
76
+ nsExec::Exec ` %SYSTEMROOT%\System32\ cmd.exe /c taskkill /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
77
77
!endif
78
78
# to ensure that files are not "in-use"
79
79
Sleep 300
91
91
!ifdef INSTALL_MODE_PER_ALL_USERS
92
92
nsExec::Exec ` taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid"`
93
93
!else
94
- nsExec::Exec ` cmd /c taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
94
+ nsExec::Exec ` %SYSTEMROOT%\System32\ cmd.exe /c taskkill /f /im "${APP_EXECUTABLE_FILENAME}" /fi "PID ne $pid" /fi "USERNAME eq %USERNAME%"`
95
95
!endif
96
96
!insertmacro FIND_PROCESS " ${APP_EXECUTABLE_FILENAME}" $R0
97
97
${If} $R0 == 0
You can’t perform that action at this time.
0 commit comments