Service Process Installer

J

John J. Hughes II

Two question:

1) Is there a way using the "System.ServiceProcess.ServiceController" to
change the service account type from say Automatic to Manual? I have a
control for my service that starts, stops, pauses, and continues but there
does not seem to be an obvious way to handle changing the startup option.

2) When installing the service can anyone tell me how or direct me to an
example for changing the "this.serviceProcessInstaller1.Account" type? I
know I need to add a question dialog and then based on the selected item
change the type but I am not sure how to see the data from the dialog screen
in the setup program.

Thanks,
John
 
G

Guest

1) Is there a way using the "System.ServiceProcess.ServiceController" to
change the service account type from say Automatic to Manual? I have a
control for my service that starts, stops, pauses, and continues but there
does not seem to be an obvious way to handle changing the startup option.

This is a property of the ServiceInstaller, not the ServiceProcessInstaller.
It's confusing, I know, why do we need two separate installers, yeah yeah
yeah.
And then there's the System.Configuration.Install.Installer that they both
get added to ...

2) When installing the service can anyone tell me how or direct me to an
example for changing the "this.serviceProcessInstaller1.Account" type? I
know I need to add a question dialog and then based on the selected item
change the type but I am not sure how to see the data from the dialog screen
in the setup program.

You can't change it once its installed. You would need to just set it from
the code in the installer class and then once its set that's it.
 

Ask a Question

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.

Ask a Question

Top