I want to do something like bash
kill -9 `cat pid.txt`
in Windows. I tried
set /p mypid= < pid.txt && taskkill /f /pid %mypid%
but it doesn't work, looks like %mypid%
becomes assigned after executing of taskkill
.
How to do it? (I'm going to call this command from NSIS install script, so I don't want to make a separate .bat
file for it).
taskkill
– Aiguillette