Service Control

crever

New member
Joined
Oct 3, 2007
Messages
1
Programming Experience
1-3
I'm trying to control services in .net. The problem is I want to disable services but the framework doesn't appear to be able to do that.

Here's the code I'm using... does anyone know of another class that will allow me to disable a service?

Dim RemoteService As New ServiceController("mssqlserver")
Dim value As String
RemoteService.MachineName = "Server1"

RemoteService.Start()

Thanks.
 
Run the ChangeStartMode method for Win32_Service class with WMI. WMI Code Creator can give you the code base.
 
Back
Top