I wish to start and stop another Windows Service application via my WIndows Form application.
Ons tart of my application I wish to start the Windows service, and on application exit I wish to stop the service.
How can this be achieved?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want to use the ServiceController class.
Initialize it with your service name, and call Start() and Stop() methods.