[erlang-questions] erlsrv on windows 10 problem
Mon May 2 21:51:04 CEST 2016
I have a script that I right-click on and select run as administrator, so
yes, it has to be done as admin.
This is what I use for win 10 (setup-erlsrv.cmd):
@rem sample erlang install service script
@rem - add then start ecom erlang service
@rem - if it already exists, stop then remove first before adding and
@erlsrv list %erl_service% | @findstr /i "%erl_service%"
@if errorlevel 1 goto next
@rem echo Removing erl service...
@erlsrv remove "%erl_service%"
@set module=-s ecom
@set onfail=-onfail restart
@set node=-name ecom@%comp%.nr.usu.edu
@rem echo %node%
@set root=-w "C:/windows/erl"
@set srvc_name=-i 0ecom
@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
@rem set args=-args "%boot% %module%"
@set args=-args "%boot% %module%"
@rem echo Adding erl service...
@erlsrv add "%erl_service%" %node% %root% %onfail% %args%
@rem echo Starting erl service...
@erlsrv start %erl_service%
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:
@FOR /F "delims=" %i IN ('sc getkeyname 0ecom') DO set z=%i
@for /f "tokens=3" %i IN ("%z%") DO set erl_servicedispname=%i
@sc config %erl_servicedispname% start= delayed-auto
I use it to install ecom.beam as a service from this project:
On Mon, May 2, 2016 at 1:18 PM, Dan Gudmundsson <> wrote:
> 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.
> But I don't really know what I'm talking about here, as I said, our
> windows competence is really low.
> So how you install the services, do you run start erlang from inside
> and admin cmd prompt.
> On Mon, May 2, 2016 at 7:27 PM Wes James <> wrote:
>> This is with the 18.3 windows binary from erlang.org.
>> On Fri, Apr 29, 2016 at 11:59 PM, Dan Gudmundsson <>
>>> Well you got it run at all, that is something, I have disabled our
>>> testing of
>>> services on Windows 10 for now, master branch, since I could not get it
>>> run at all.
>>> From what I googled and understood you will need start the services from
>>> an elevated shell, an administer user is not enough.
>>> But you might already do that or I got it wrong.
>>> Anyway, our Windows knowledge, and priority, is not at the highest level.
>>> So any help would be appreciated.
>>> On Fri, Apr 29, 2016 at 5:55 PM Wes James <> wrote:
>>>> 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?
>>>> I just found this windows command:
>>>> sc config SVCNAME start= delayed-auto
>>>> I can use that in the install script.
>>>> 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.
>>>> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions