We can run some dos commands now in a windows shell with node-webkit.
On your clode program function maybe add a node webkit:run and:
Taskkill /F /IM YourApplicationNameHere.exe
I have a feeling Chrome has some sort of safety feature that might not allow this. I can not seem to pass anything to the command shell (cmd.exe). It may not let you access Taskkill.exe either.
If it works, it might be an OK workaround, until we find something better.