<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>10 Mar 2016 05:55:00 Z</lastBuildDate><pubDate>9 Mar 2016 10:54:00 Z</pubDate><description>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:&#13;
IF CommandLine(2) = "-d" THEN // activate debug mode END&#13;
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?</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp</link><title>Window Service and CommandLine</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56784/read.awp</comments><pubDate>10 Mar 2016 05:55:00 Z</pubDate><description>In terms of registry edits, I don't have access to a machine that has a working example so I am unable to be very specific. As I…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56784/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56784/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56782/read.awp</comments><pubDate>9 Mar 2016 22:11:00 Z</pubDate><description>Quote&#13;
Stewart Crisler&#13;
&#13;
With a regular windows program CommandLine(1) is the first parameter.  With a service, CommandLine(1) …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56782/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56782/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56781/read.awp</comments><pubDate>9 Mar 2016 22:03:00 Z</pubDate><description>Quote&#13;
Fabrice Harari&#13;
&#13;
you are not showing us the most important part : the FULL commandline you are setting for the service.&#13;…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56781/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56781/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56777/read.awp</comments><pubDate>9 Mar 2016 19:54:00 Z</pubDate><description>My experience with services is that CommandLine() works differently than with a regular windows program.&#13;
&#13;
With a regular windo…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56777/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56777/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56770/read.awp</comments><pubDate>9 Mar 2016 12:35:00 Z</pubDate><description>Hi,&#13;
&#13;
you are not showing us the most important part : the FULL commandline you are setting for the service.&#13;
&#13;
So your syntax …</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56770/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56770/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56769/read.awp</comments><pubDate>9 Mar 2016 12:29:00 Z</pubDate><description>local service account doesn't have access to write to the file location specified.</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56769/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline-56769/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/56767-window-service-and-commandline/read.awp">Window Service and CommandLine</source><title>Re: Window Service and CommandLine</title></item></channel></rss>
