in reply to Start a service, wait 10 seconds, and stop the service.

If it's a windows service (if not, you can make it into one, but that's beyond the scope of this reply), you can do a batch file or a perl script (as suggested above), but the key is to use net {start|stop} so you don't have to deal with the pids yourself (which of course is possible):
REM batch file method: net start my_service perl -e "sleep 10" net stop my_service # perl method: system("net start my_service"); sleep 10; system("net stop my_service");