10
5
I have BAT file running in background on Windows which lasts about ten minutes. Now I want to stop it while it's running, but I can't find its name in the process-list in the task manager. So how can I approach this? Thanks!
UPDATE1
It seems difficult to stop a running BAT process in backgroud.And I decide to try to kill every process involved by the BAT file by name,which may be overkilled.It's acceptable to me since most processes in my BAT file are not used frequently,such as ping,tracert,netstat etc.If you have any better solution please let me know.Thanks.
UPDATE2
BAT process tree
1How did you make the bat file run in the background? you say you can't do ctrl-c. i'd try break=on if that doesn't work, but you say you can't do ctrl-c because it is "in the background". Maybe it already ran and finished, and you just have to kill what it spawned. – barlop – 2010-11-17T07:44:34.920
2@barlop,it can be excuted in backgroud with
ShellExecute(NULL,"open","some.bat",NULL,NULL,SW_HIDE);
in VC++. – SpawnST – 2010-11-17T08:09:23.750