ServiceStartMode.Automatic Question.

Hi guys! I'm trying to accomplish a rather simple task, but I seem to have coders block on how to do so. My application checks to see the status of certain services on remote machines and will start or stop them depending on the status. My issue is when the service is set to DISABLED as the start up type. If it is Manual or Automatic my script can still do its job; however, when set to Disabled it kind of errors out because the application does have access to that service. When I try: serviceController1.GetType = System.ServiceProcess.ServiceStartMode.Automatic It tells me that serviceController1.GetType is Read Only, but I need to some how modify that attribute of Read-Only or come up with another way to alter it. Any help would be great. One last FYI is that the Remote Registry is set to Disabled on some of the machines too.

Thank you,
Chris



Answer this question

ServiceStartMode.Automatic Question.

  • JustJF

    I have the same problem! Doesnt anybody have an idea
  • ServiceStartMode.Automatic Question.