I tried RunAsService
And the service successfully started my batch file, but my case is that :
My batch file executes python code and this python code instantiate a java process
so the process tree when running RunAsService is like :
+RunAsService
+python
+java
when I manually Stop the service it killed the RunAsService process only and left the rest of tree (python) and (java) processes, so my application still running, and its a problem.
I also tried the Instructions here http://www.mike-tech.com/article.php?gif=win2k&article=135
the process tree wals like :
+srvany
+cmd
+python
+java
When i manually STOP the service It killed (srvany) process and its first child (cmd) and left (python) and (java) process still alive.
The FireDaemon really worked fine and killed the whole tree when stopping the service..But It's not free :S
Is there any other way taht I can kill the whole tree in Service Stop, or any free software like FireDaemon ??