Is there any way to stop the batch jobs (.cmd and .bat) rather that force taskkill using batch script? -


is pressing ctrl + c while running batch job , taskkill /f /im cmd.exe same?

actually want close 3 batch jobs ((2)cmd's , (1)bat files) through batch script. found there no command stop start. don't want kill parent image name (cmd.exe) using force taskkill. manually used press ctrl + c terminate job. don't want use more. there way kill/stop running job rather force taskkill? time!

this has set 1 of console programs. you'll need write program it.

generateconsolectrlevent

sends specified signal console process group shares console associated calling process.

bool winapi generateconsolectrlevent(   dword dwctrlevent,   dword dwprocessgroupid ); 

parameters

dwctrlevent  

[in] type of signal generate. parameter can 1 of following values.

value meaning

ctrl_c_event

0 generates ctrl+c signal. signal cannot generated process groups. if dwprocessgroupid nonzero, function succeed, ctrl+c signal not received processes within specified process group.

ctrl_break_event

1 generates ctrl+break signal.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -