service load fails through createprocess?
I have a wind开发者_C百科ows service.
I can install it through cmd with "c:\serviceName -install"
when I do createProcess
and pass command line -install
it does not appear in the Service Control manager
. The createProcess returns non-zero value
"GetExitCodeProcess" gives 0
.
Following is a line from the code:
CreateProcess(Process,pCmdLine,NULL,NULL,FALSE,DETACHED_PROCESS,NULL,NULL,&stStartupInfo,pProcessInfo);
Variable name are fairly self-explained.
Please comment.
精彩评论