Re: How to shut down my windows service by Erick
Erick
Thu Aug 11 16:47:07 CDT 2005
> I want to add a "Stop Service" button in my UI app, but am unsure how
to
> code the shut down within the service app. Call Dispose()?
Look at service controller:
ServiceController controller = new ServiceController("MyService");
controller.Start();
controller.Stop();
Don't forget to reference System.ServiceProcess.
HTH
Erick Sgarbi
www.blog.csharpbox.com
"mike" <milop@slomins.com> wrote in message
news:#H2gPOqnFHA.1996@TK2MSFTNGP10.phx.gbl:
> Hello.
>
> I've created a windows service application. I am also creating a UI for it.
>
> I want to add a "Stop Service" button in my UI app, but am unsure how to
> code the shut down within the service app. Call Dispose()?
>
> Thanks in advance,
>
> Mike