Tech Support > Microsoft Windows > Development Resources > Services: Passing parameters via registry settings
Services: Passing parameters via registry settings
Posted by Martin Gamwell Dawids on December 9th, 2003


From the "Services" control panel it is possible to specify startup
(command-line) parameters to be passed to a service on startup.

Does anyone know how (if possible) to specify startup parameters in the
registry?

The value
\\HKLM\SYSTEM\CurrentControlSet\Services\MyService \ImagePath
tells the "Service Control Manager" (SCM) which executable to start. I tried
altering the value from something like this:
myservice.exe
to something like this:
myservice.exe -option 1

However, it doesn't seem to have any effect. Does anyone know another
registry key/value to add or modify? Any links to documentation regarding
the SCM's use of the registry is also very welcome.

Thank you in advance.

/Martin