I have this command:
$ping = Run( @ComSpec & " /c ping www.google.com -t" , @SystemDir , @SW_HIDE , $STDOUT_CHILD )
and this exit function:
OnAutoItExitRegister( "_Esc" )
Func _Esc()
ProcessClose( $ping )
ProcessClose( "PING.exe" )
ProcessClose( "conhost.exe" )
Exit
EndFunc
but if i run the script and then run this command:
C:\Windows\System32\cmd.exe /q /c ping www.google.com -t
it opens another 2 "PING.exe" and "conhost.exe" processes and then the script doesn't know which of them to close
How can I release memory so that when I exit the script it also closes the processes that it opened?