Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

Window Service and CommandLine

$
0
0
I have a Windows service. I need to run it (sometimes) in debug mode. I know I can set command line parameters in Service properties. I use this code in Service:
IF CommandLine(2) = "-d" THEN 
  // activate debug mode
END

But unfortunately the debug mode is not activated. I do some testing and write content of CommandLine(),CommandLine(1),CommandLine(2) in EventLog and I saw complete filename for service executable in cases 1 and 2, and empty value for case 3. But I didn't see option "-d" in three results. Could you please someone explain me why CommandLine returns unexpected value in ServiceMode?

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>