sc.Pause()
Try
While sc.Status = ServiceControllerStatus.Paused
Threading.Thread.Sleep(1000)
sc.Refresh()
End While
Catch ex As Exception
End Try
Hello everyone!
I am having an issue with the above code. when sc.Pause() runs it gives me an exception of
'Cannot open Dhcp Service on computer '.' inner Exception Win32Exception: Access is denied
Any help is appreciated!
Thanks,
Kyvex