On the client or on the server? I doubt that this is possible on the client
without writing some ugly ActiveX control or .NET Browser Control. Maybe
it's better to develop a classic rich-client Windows Forms application
instead of a Web application.
If you set a reference to System.ServiceProcess, you could use a
function like this one below to check it. I use it in a service of
mine to check for dependency services.
Function CheckIfServiceIsRunning(ByVal serviceName As String) As
Boolean
Dim mySC As ServiceProcess.ServiceController
mySC = New ServiceProcess.ServiceController(serviceName)
If mySC.Status = ServiceProcess.ServiceControllerStatus.Stopped
Then
' Service isn't running
Return False
ElseIf mySC.Status =
ServiceProcess.ServiceControllerStatus.Running Then
' Service already running
Return True
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.