Can't start service from windows services, when executable path contains spaces


I run elixir service on windows platform. As we use in windows service panel for starting and stopping of services, i came across an issue.

My elixir service is one of the MSI sub application. So My MSI contain folder structure where a specific folder name is having space(for example “MY FOLDER”).

When I try to start services which start from this folder, it fails to starts

Did anyone faced such issues. if yes, can someone direct on with solution


1 Like

I am trying to install a Windows service in “C:\Program Files\MyCompany\MyApp” and I have the same warning popup:

Windows could not start the myapp_myapp service on Local Computer.

Error 1067: The process terminated unexpectedly.

I initially though it was due to some permissions on “C:\Program Files” but after 2 tests (“C:\FooBar\MyCompany\MyApp” and “C:\Foo Bar\MyCompany\MyApp”) I can confirm it is due to the space in the path.

For information, when installing in “C:\Program Files\…”, I can start the app with bin\myapp.bat start but not with erts-10.3\bin\erlsrv.exe start myapp_myapp:

C:\Program Files\MyCompany\MyApp>bin\myapp.bat start

Terminate batch job (Y/N)?
C:\Program Files\MyCompany\MyApp>erts-10.3\bin\erlsrv.exe start myapp_myapp
erts-10.3\bin\erlsrv.exe: Failed to start service myapp_myapp.
Error: The process terminated unexpectedly.