Hi,
This is one way to do it:
--- Code snippet ---
System.ServiceProcess.ServiceController sc = new
System.ServiceProcess.ServiceController("my Service Name");
sc.Stop();
--- End Code Snippet ---
I do not know if there's another way to do it, so i suggest that you ask in
public.dotnet.languages.csharp if you do not think this is the best
solution.
For more information, please look at the ServiceController class in MSDN
Hope this helps!
--
Regards,
Kristofer Gafvert
http://www.ilopia.com - My personal Web Site, with information about things
i find interesting, for example Windows Server 2003.
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.