View Single Post
 
Old 02-08-2019, 01:51 PM
Luiz Eduardo Luiz Eduardo is offline
Member
 
Join Date: May 2014
Posts: 40
Lightbulb

Quote:
Originally Posted by Norrit View Post
This code should work to execute a batch file.
Problem is that in your batchfile you try to kill the service itself, that's not allowed.
I discovered that trouble is because the batch file also is executed in debug mode:

Code:
dwCreationFlags = DEBUG_PROCESS;
So, batch file fails to delete executables after kill because he still is linked with debug of some way.


Here was the final solution:

Code:
dwCreationFlags = DEBUG_ONLY_THIS_PROCESS;

Last edited by Luiz Eduardo; 02-08-2019 at 01:54 PM.
Reply With Quote