Link to home
Start Free TrialLog in
Avatar of skaaman
skaaman

asked on

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
Avatar of jkr
jkr
Flag of Germany image

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.
Avatar of AlexFM
AlexFM

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.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial