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,415
  • 15
  • 56
  • 90

2 Answers2

4

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

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
0
Process.Start("net start myService");
burning_LEGION
  • 13,246
  • 8
  • 40
  • 52