How to Persist Service Start Parameters.

Is there a way to persist the start parameters field in a Windows service properties dialog.

My code accepts it fine, the next time, but I need to manually specify the parms everytime the service starts.

thx
skaamanAsked:
Who is Participating?
 
Computer101Commented:
PAQed - no points refunded (of 500)

Computer101
E-E Admin
0
 
jkrCommented:
That's by design - the common workaround is to place the arguments you want to examine e.g. in a registry key and have the service read them from there explicitly.
0
 
AlexFMCommented:
CreateService function adds service to SCM database. It's lpBinaryPathName parameter may contain both service exe file name and required parameters. You can see the sample of service registration code in the book "Programming Served-Side Applications for Microsoft Windows 2000" by Jeffrey Richter and Jason D. Clark.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.