I want to write a batch file that updates a DLL that is in use by a running process, a regular application.
To do this, the plan is to stop the process, copy the DLL to the required location, then restart the process.
I know I can try to kill a process with taskkill. How can I make sure the process has fallen over and died, after I shoot it?
Here’s what I used. It’s a subroutine in a batch file.
To use it from within a batch file, do like this:
Full example:
You’ll notice lines that have all dashes – that’s not a legal syntax for a batch file of course. But, those lines are never reached, because of the use of GOTO statements, so the syntax is never evaluated. Therefore those lines aren’t a problem.