Saved Bookmarks
| 1. |
Solve : How to start and then later kill an exe from a .bat file??? |
|
Answer» I've an .exe which i need to call through an .BAT file and then i need to kill this .exe at a later stage. I've an .exe which I need to call through an .bat file and then I need to kill this .exe at a later stage. E:\>type killnote.bat Code: [Select]@echo off start notepad joe.txt sleep 60 tasklist | findstr "%1" > notepid.txt for /f "tokens=1,2 delims= " %%i in (notepid.txt) do ( echo PID=%%j taskkill /pid %%j ) OUTPUT: E:\>killnote.bat note pid=3056 SUCCESS: Sent TERMINATION signal to the process with PID 3056. E:\> |
|