mirror of
https://github.com/reactos/ahk_tests.git
synced 2024-11-27 05:20:25 +00:00
[AHK_Helper_Functions]
Terminate '*msiexec*' processes in TerminateTmpProcesses() and add FIXME in WindowCleanup() to remove some stuff when CORE-6939 is fixed. svn path=/trunk/ahk_tests/; revision=1967
This commit is contained in:
parent
a3c1e58f82
commit
1b6792c516
@ -430,6 +430,8 @@ WindowCleanup(ProcessName)
|
||||
OutputDebug, Helper Functions: Succesfully terminated '%name_no_ext%.tmp' process.`n
|
||||
}
|
||||
|
||||
; FIXME: remove 'Setup.exe', 'Install.exe' and 'msiexec.exe' termination when CORE-6939 is fixed,
|
||||
; because TerminateTmpProcesses() will do such things for us
|
||||
Process, Exist, Setup.exe
|
||||
if ErrorLevel != 0
|
||||
{
|
||||
@ -439,6 +441,19 @@ WindowCleanup(ProcessName)
|
||||
OutputDebug, Helper Functions: Unable to terminate 'Setup.exe' process.`n
|
||||
}
|
||||
|
||||
Process, Exist, install.exe
|
||||
if ErrorLevel != 0
|
||||
{
|
||||
Process, close, install.exe
|
||||
Process, WaitClose, install.exe, 5
|
||||
if ErrorLevel
|
||||
{
|
||||
Process, WaitClose, install.exe, 5
|
||||
if ErrorLevel
|
||||
OutputDebug, Helper Functions: Unable to terminate 'install.exe' process.`n
|
||||
}
|
||||
}
|
||||
|
||||
Process, Exist, msiexec.exe
|
||||
if ErrorLevel != 0
|
||||
{
|
||||
@ -454,20 +469,6 @@ WindowCleanup(ProcessName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Process, Exist, install.exe
|
||||
if ErrorLevel != 0
|
||||
{
|
||||
Process, close, install.exe
|
||||
Process, WaitClose, install.exe, 5
|
||||
if ErrorLevel
|
||||
{
|
||||
Process, WaitClose, install.exe, 5
|
||||
if ErrorLevel
|
||||
OutputDebug, Helper Functions: Unable to terminate 'install.exe' process.`n
|
||||
}
|
||||
}
|
||||
|
||||
WinGetActiveTitle, ErrorWinTitle
|
||||
if not ErrorLevel
|
||||
{
|
||||
@ -559,6 +560,7 @@ TerminateTmpProcesses()
|
||||
sztmp = .tmp
|
||||
szSetup = Setup
|
||||
szInstall = Install
|
||||
szMsiExec = msiexec
|
||||
IfInString, n, %sztmp%
|
||||
{
|
||||
Process, Exist, %n% ; Will kill all '*.tmp' processes
|
||||
@ -610,6 +612,23 @@ TerminateTmpProcesses()
|
||||
OutputDebug, Helper Functions: Successfully terminated '%n%' process.`n
|
||||
}
|
||||
}
|
||||
else IfInString, n, %szMsiExec%
|
||||
{
|
||||
Process, Exist, %n% ; Will kill all '*msiexec*' processes
|
||||
if ErrorLevel != 0
|
||||
{
|
||||
Process, close, %n%
|
||||
Process, WaitClose, %n%, 5
|
||||
if ErrorLevel
|
||||
{
|
||||
bError := true
|
||||
iUnterminated++
|
||||
OutputDebug, Helper Functions: Unable to terminate '%n%' process.`n
|
||||
}
|
||||
else
|
||||
OutputDebug, Helper Functions: Successfully terminated '%n%' process.`n
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DllCall("FreeLibrary", "UInt", hModule) ; unload the library to free memory
|
||||
|
Loading…
Reference in New Issue
Block a user