To be honest, I do not see how you will have your batch file automatically stop your services, unless the program allows you to run commands on close, which is not common at all.
If the batch file runs and stays open in the background, it may do it when you exit the program, but do you really want a command box open the whole time while you use your program, and wait for you to end using it? That would drive me crazy.
I would use your batch file to start the services, then launch the program, and not worry about the services stopping until a reboot does it for you, or create a separate batch file to stop the services if you really want. Here is the sample batch file to get started:
net start ServiceName
net start Service_Name
"C:\Program Files\Microsoft Office\Office14\winword.exe"
You can find the real names of the services needed for net start/stop here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
Althought another case, check this the application I am starting is waiting with the
– Starx – 2011-07-27T02:33:06.883/wait
switch