![]() |
| ||
| Need to send Cntrl +C to an Running Exe using a DOS batch File. Hello, I have a query regarding a DOS command. I know this link is not the right place to ask queres about DOS but didnt find any another link in this forum. I need to send Cntrol +C to a running Exe (running on Windows) using a batch file.Can Any one guide me for this. Regards. |
| ||
| Re: Need to send Cntrl +C to an Running Exe using a DOS batch File. >>Can Any one guide me for this. As a batch file, forget it. Can't be done. There is no way to send anything to an already running program from a batch file. But you can write a C or C++ program to do that and call that program from the batch file. |
| ||
| Re: Need to send Cntrl +C to an Running Exe using a DOS batch File. But this thing is definitely possible in Linux. |
| ||
| Re: Need to send Cntrl +C to an Running Exe using a DOS batch File. Shell programming in *nix is considerably more powerful than batch processing in MS-DOS and MS-Windows. Most things you see in *nix shell programs are not possible in batch files. |
| ||
| Re: Need to send Cntrl +C to an Running Exe using a DOS batch File. Ancient Dragon is correct, there is no way of manipulating threads using batch - or in other words, there is no command redirection available under command.com which allows you to send command output from a control-c into the input thread of a running program. You would have to use a programming language with a WIndows API available so you can manipulate threads via the Kernel. |
| ||
| Re: Need to send Cntrl +C to an Running Exe using a DOS batch File. All the other posters are correct from what I can tell. If you want to access a thread of a process your out of luck unless you bust out some C/C++ code to terminate it. If you just want to kill the running process then you can try to use pskill.exe provided in the Systernals Tools. Here is the help from the tool: Quote:
|
| All times are GMT -4. The time now is 11:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC