0

Possible Duplicate:
C# start Windows Service programmatically

I want to start/stop a preexisting windows service from inside of wpf application . Any pointers on how to do that ?

Community
  • 1
  • 1
rajat
  • 3,279
  • 13
  • 52
  • 89

2 Answers2

4

You are looking for the ServiceController class and more specifically the Start/Stop methods.

Darin Dimitrov
  • 994,864
  • 265
  • 3,241
  • 2,902
0
Process.Start("net start myService");
burning_LEGION
  • 12,864
  • 8
  • 38
  • 50