Re: Windows Service

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



windows application must start and stop the service.
//using System.ServiceProcess;
ServiceController controller = new ServiceController("MyService");
controller.Start(null);
controller.Stop();

i have other question, when i desinstall the program can it stop the
service and desinstall the windows service and the windows application?
No, by using installutil under .NET SDK it will only uninstall your windows service.

HTH
Erick Sgarbi
www.blog.csharpbox.com




"junior lopes" <horacyjr@xxxxxxxxxxx> wrote in message news:OI9p3FnnFHA.3020@xxxxxxxxxxxxxxxxxxxx:

i have 2 applications, one is windows application, the other is windows
service.
the windows application must start and stop the windows service.
so i neeed to have, a setup that can install both at the same.  the
windows application must start and stop the service.
is that possible ?
i have other question, when i desinstall the program can it stop the
service and desinstall the windows service and the windows application?
my purpose is to make a program, that uses windows service, controlled
by windows application.

Thanks for helping


*** Sent via Developersdex http://www.developersdex.com ***

.