For simplicity, you could always resort to modifying the registry Start
value under the service key you are interested in and change it to one of
the int values of the ServiceStartMode enum.  There are two other values
missing from the enum but those are for driver services only.

Chad

On Thu, 11 Dec 2003 12:34:20 -0600, Gautama, Damon
<[EMAIL PROTECTED]> wrote:

>Hello,
>I am trying to programmatically change the Startup Type for Services, and
disable/enable Devices. The ServiceController class makes it possible to
Start, Stop, Continue, and Pause, but I am looking to go a little more
permanent (Disable/Enable/Manual for Services).
>
>Is there a way to do this though the .NET framework, or do I have to use
interop and go back to OpenSCManager, etc?
>
>Thanks,
>damon
>
>===================================
>This list is hosted by DevelopMentor�  http://www.develop.com
>Some .NET courses you may be interested in:
>
>NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to