I made a batch file that kills a couple tasks and restarts them like so:
taskkill /f /im "task1.exe" taskkill /f /im task2.exe start C:\path\task.exe
This bat file runs fine when run through a cmd prompt. However, when trying to run it through NppExec, the first
taskkill fails with
Reason: Access is denied. The second
taskkill and the
start work fine.
Why might one fail and another succeed when running the batch via command prompt has both succeed? How might I fix it so both tasks end?