You can easily start/stop a windows service using the following code snippet.
Dim service As ServiceController = New ServiceController("Service Name")
If (service.Status.Equals(ServiceControllerStatus.Running)) Then
service.Stop()
End If
Cheers,
Samitha
No comments:
Post a Comment