sc.Pause()
Try
While sc.Status = ServiceControllerStatus.Paused
Threading.Thread.Sleep(1000)
sc.Refresh()
End While
Catch ex As Exception
End Try
大家好!
我对上面的代码有疑问。当 sc.Pause() 运行时,它给了我一个例外
'Cannot open Dhcp Service on computer '.' inner Exception Win32Exception: Access is denied
任何帮助表示赞赏!
谢谢,
凯威克斯