How do I shut down NT an NT service

How can I shut down an NT service.  
I can identify the services running on an NT box.  I need to shut one down - do a few things - And then bring it back up again.  I need some ideas how to shut it down and then bring it up in my code.
Who is Participating?
jkrConnect With a Mentor Commented:
See 'ControlService()'. Use 'SERVICE_CONTROL_STOP' to stop it and  'SERVICE_CONTROL_START' to restart it.
bkr070998Author Commented:
Edited text of question
bkr070998Author Commented:
jkr - Great answer! It works well

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.