Answer the question
In order to leave comments, you need to log in
How to force terminate the process of another program?
Good afternoon.
I'm not a programmer, I use what I find on the internet, please don't kick too hard. In general, there is a program "A", which has the function of reloading another program "B" (Terminal S MetaTrader4, they periodically freeze and need to be restarted).
Tried to write:
PostMessage(StrToInt(handleChart) , WM_KEYDOWN, 152, 0);
WinExec(PANsiChar('taskkill /F /IM terminal.exe'), SW_HIDE);
C:\Program Files (x86)\terminal1\terminal.exe
C:\Program Files (x86)\terminal2\terminal.exe
WinExec(PANsiChar('taskkill /F /IM '+accounts[i].MT4_Path), SW_HIDE);
WinExec(PANsiChar('taskkill /F /IM C:\Program Files (x86)\terminal1\terminal.exe'), SW_HIDE);
Answer the question
In order to leave comments, you need to log in
Method for terminating a process:
vsokovikov.narod.ru/New_MSDN_API/Process_thread/fn...
Displaying a list of processes and searching for the one you need:
www.delphibasics.info/home/delphibasicssnippets/en...
You can find everything else here:
www.delphibasics. info/home/delphibasicssnippets
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question