How to get a return value from a winservice at cmd batch: net start ...
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I have a windows service called "XcontrolService" programmed in C#. From a cmd - Batch, i'll start the installed service with net start XcontrolService. In the OnStart-Method of service, i will do some jobs and on the end i would like to return a own defined value to batch. OnStart returns void!, and ServiceBase.ExitCode does not match %ERRORLEVEL% from batch. Can you help me about this problem? Thanks! Kind Regards Daniel