I am working on an application which starts as a service but only if a commandline switch tells it to (otherwise a standard form is opened). So when the service is started by Windows at bootup, it must pass this commandline option or the service fails to start.
I would like to have the installer (ServiceProcessInstaller) add a commandline option so that when the service is started it adds the commandline option to the command.
Example: MyService.exe -commandlineoption
I thought this was what the ServiceProcessorInstaller.Context property was for, but that is for the arguments that were executed on InstallUtil.
Any suggestions?