I read a lot of answers on the Internet about how to use SRVANY.exe to create a Windows service from anything. My service is a batch file that sets up the environment (I need to install env vars and disk maps) and then spawns my C ++ application. But when I do NET STOP, the srvany.exe process disappears and my C ++ application stays alive. Is there any way to kill him when he receives a stop command? I will need to bounce from it in case of any changes to the configuration file.
The reason I chose shell is because of the simple display of the disk. In theory, I can wrap it in either perl or python, depending on which is easier to get this behavior, but then I will need to lay out a shell anyway to map the disks. It makes sense?
source
share