I am using the Apache Commons Daemon (prunsrv.exe) as a wrapper to run an .exe as a Windows Service. However, I am not sure what the proper way of killing only this instance of the .exe is when the service is manually stopped. I could not find any documentation for the .exe mode of the Commons Daemon, so I am using the following arguments to prunsrv.exe when I install the service: //IS//[service name] [installation arguments] --StopImage "C:\Windows\System32\taskkill.exe" ++StopParams /IM;[.exe name];/T;/F

My concern is that this will kill all instances of the .exe, not just the one running as a service. Is there a way I can kill only the instance generated by the service?

link|improve this question
feedback

migrated from stackoverflow.com Dec 7 '11 at 0:23

This question came from our site for professional and enthusiast programmers.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown