hello guys, how to start and stop a service with elevation.
got this code below but it doesn't run i suspect due to admin rights issues.
any ideas on how to make this code works?
Dim service As ServiceController = New ServiceController("W32Time") If ((service.Status.Equals(ServiceControllerStatus.Stopped)) Or (service.Status.Equals(ServiceControllerStatus.StopPending))) Then service.Start() Else service.Stop() End If
Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
IT Stuff Quick Bytes