Stopping Windows service does not kill processes (service uses ant)
Solution 1:
Unvortunately, SRVANY sucks. There is an alternative which is the "Non-Sucking Service Manager" (NSSM) - it will shut down your application and all child processes on the service stop signal.
Solution 2:
Unfortunately, srvany.exe does not provide any method for killing the process(es) when the service is stopped, so basically your options are to (a) look for a third-party alternative which does provide this functionality or (b) write such a replacement yourself.
Perhaps another reader knows about a good third-party alternative, or you might get lucky with a Google search. If you decide to go with option (b) I may be able to give you a head start, so drop me an email if you like - my address is in my profile. Or you could post a question to StackOverflow.
Solution 3:
Srvany has a few well known shortcomings, one of which is not terminating the process it starts.
Be sure to read about other potential issues on this page comparing Srvany to AlwaysUp (our commercial application which will close all sub-processes as you expect) to reduce the surprises...