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
My code accepts it fine, the next time, but I need to manually specify the parms everytime the service starts.
thx
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.