<div dir="ltr">I have a script that I right-click on and select run as administrator, so yes, it has to be done as admin.<div><br></div><div>This is what I use for win 10 (setup-erlsrv.cmd):</div><div><br></div><div><div>@echo off</div><div><br></div><div>@rem</div><div>@rem sample erlang install service script</div><div>@rem - add then start ecom erlang service</div><div>@rem - if it already exists, stop then remove first before adding and starting</div><div>@rem </div><div><br></div><div>@set erl_service=0ecom</div><div>@erlsrv list %erl_service% | @findstr /i "%erl_service%"</div><div>@if errorlevel 1 goto next</div><div>@echo.</div><div>@rem echo Removing erl service...</div><div>@erlsrv remove "%erl_service%"</div><div><br></div><div>rem @goto:EOF</div><div><br></div><div>:next</div><div><br></div><div>@SETLOCAL ENABLEDELAYEDEXPANSION</div><div>@SET comp=computer-name</div><div><br></div><div>@set module=-s ecom</div><div>@set onfail=-onfail restart</div><div>@set node=-name ecom@%comp%.<a href="http://nr.usu.edu">nr.usu.edu</a></div><div>@rem echo %node%</div><div>@set root=-w "C:/windows/erl"</div><div>@set srvc_name=-i 0ecom</div><div>@set boot=-boot c:/windows/erl/start_ssl_ecom -proto_dist inet_tls -ssl_dist_opt server_certfile c:/windows/erl/ssl/cert.pem -ssl_dist_opt server_keyfile c:/windows/erl/ssl/key.pem -ssl_dist_opt server_secure_renegotiate true client_secure_renegotiate true</div><div>@rem set args=-args "%boot% %module%"</div><div>@set args=-args "%boot% %module%"</div><div><br></div><div>@echo.</div><div>@rem echo Adding erl service...</div><div>@erlsrv add "%erl_service%" %node% %root% %onfail% %args%</div><div>@echo.</div><div>@rem echo Starting erl service...</div><div>@erlsrv start %erl_service%</div><div>@echo.</div><div><br></div><div>:end</div><div>@pause</div><div>@goto:EOF</div><div><br></div><div>-------------</div><div><br></div><div>Then I paste this in to an elevated cmd shell (for some reason it won't run from a file) to set the service to automatic delayed:</div><div><br></div><div><div>@FOR /F "delims=" %i IN ('sc getkeyname 0ecom') DO set z=%i</div><div>@echo %z%</div><div>@for /f "tokens=3" %i IN ("%z%") DO set erl_servicedispname=%i</div><div>@echo %erl_servicedispname%</div><div><br></div><div>@sc config %erl_servicedispname% start= delayed-auto</div></div><div><br></div><div>-------</div><div><br></div><div>I use it to install ecom.beam as a service from this project:</div><div><br></div><div><a href="https://github.com/comptekki/esysman">https://github.com/comptekki/esysman</a><br></div><div><br></div><div>-wes<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 1:18 PM, Dan Gudmundsson <span dir="ltr"><<a href="mailto:dangud@gmail.com" target="_blank">dangud@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I do not remember the exact error message now, but what I gathered you had to start erlsrv (and erlang) from an "elevated" shell, otherwise you don't have the permissions to install the services. And we run our automtic tests from a "admin" user but not from an "elevated" shell.<div><br></div><div>But I don't really know what I'm talking about here, as I said, our windows competence is really low. </div><div><br></div><div>So how you install the services, do you run start erlang from inside</div><div>and admin cmd prompt.</div><div><br></div><div>Regards</div><span class="HOEnZb"><font color="#888888"><div>/Dan</div></font></span><div><div class="h5"><div><br></div><div><div class="gmail_quote"><div dir="ltr">On Mon, May 2, 2016 at 7:27 PM Wes James <<a href="mailto:comptekki@gmail.com" target="_blank">comptekki@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is with the 18.3 windows binary from <a href="http://erlang.org" target="_blank">erlang.org</a>.</div><div dir="ltr"><div><br></div><div>-wes</div></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <span dir="ltr"><<a href="mailto:dgud@erlang.org" target="_blank">dgud@erlang.org</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="line-height:1.5">Well you got it run at all, that is something, I have disabled our testing of</span><br></div><div><span style="line-height:1.5">services on Windows 10 for now, master branch, since I could not get it run at all. </span></div><div><br></div><div>From what I googled and understood you will need start the services from an elevated shell, an administer user is not enough. </div><div>But you might already do that or I got it wrong.</div><div><br></div><div>Anyway, our Windows knowledge, and priority, is not at the highest level.</div><div>So any help would be appreciated.</div><div><br></div><div>/Dan</div><br><div class="gmail_quote"><div><div><div dir="ltr">On Fri, Apr 29, 2016 at 5:55 PM Wes James <<a href="mailto:comptekki@gmail.com" target="_blank">comptekki@gmail.com</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">I use erlsrv to install an erlang application on windows.  Windows 7 works fine, but on windows 10, I have to go in and change the service from automatic to Automatic (delayed start), otherwise the app never runs on system start up.  Any idea how to fix this?<br><br>I just found this windows command:<br><br>sc config SVCNAME start= delayed-auto<div><br></div><div>I can use that in the install script.<br><br>I'd still like it to start with just automatic.  With the delayed option, it takes several extra minutes for the service to start running.<br><br>Thanks,<br><br>-wes<br></div></div></div></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div></div>
</blockquote></div></div></blockquote></div></div></div></div></div>
</blockquote></div><br></div>