<br><div class="gmail_quote">On Mon, Oct 10, 2011 at 10:06 PM, Michael Mileusnich <span dir="ltr"><<a href="mailto:justmike2000@gmail.com">justmike2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<div><br></div><div>Erlsrv looks very simple however I have tried many different combinations of commands and cannot get my server to stay active or get accurate debug information. Could anybody provide me with what the command to form a Windows service using Erlsrv with the following command:</div>
<div><br></div><div><span style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">erl -pa ebin -run hqcontroller run -extra $DATA</span></div>
<div><span style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="color: rgb(34, 34, 34); font-family: arial,sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);">- My beam files are in the ebin folder</span></div>
<div><br></div><div>Thanks,</div><div>Michael Mileusnich</div>
<br></blockquote><div> </div></div>Something along these lines should work:<br><br>set PATH=%ERLPATH%;%PATH%<br><br>erlsrv add "MyService" ^<br> -internalservicename "MyService" ^<br> -sname "MyService@localhost" ^<br>
-stopaction "init:stop()." ^<br> -workdir "C:/MyWorkdir" ^<br> -args "-pa ebin -run hqcontroller run -extra %DATA%" ^<br> -env PATH="%PATH%"<br><br>The important bit here is the -workdir option (not sure if you need -sname or -stopaction for your purposes), telling the service where it'll be running. Without that, you "-pa ebin" doesn't say much. And you better make sure your DATA env var is properly formatted/quoted, or you'll end up with lots of bizarreness.<br>
<br>Robby<br><br>