|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to access "start parameters" on a Windows Service?I have a Windows Service written in C# 2.0. I need to pass a parameter
using the Startup parameters feature of the service properties. I figured it would pass it to the executable as a command-line parameter but it doesn't seem to work like that. How does my C# code access the service start parameters? If you derive your service from System.ServiceProcess.ServiceBase, then one
of the methods you override is protected override void OnStart( string[] args ) The string[] args are your startup parameters. Show quote "Jen" <n***@nowhere.com> wrote in message news:OOYLPyPOHHA.3944@TK2MSFTNGP06.phx.gbl... >I have a Windows Service written in C# 2.0. I need to pass a parameter >using the Startup parameters feature of the service properties. I figured >it would pass it to the executable as a command-line parameter but it >doesn't seem to work like that. How does my C# code access the service >start parameters? > |
|||||||||||||||||||||||