Hi Team,
I am new to Elixir, While creating the release for production deployment on windows, i couldn’t see any options of uninstall a services
C:\Users\aramadug\Desktop\Elixir\PIMS_umbrella\Shared\Shared>_build\prod\rel\pims\bin\pims
Usage: pims.bat COMMAND [ARGS]
The known commands are:
start Starts the system
start_iex Starts the system with IEx attached
install Installs this system as a Windows service Install alone is available
eval “EXPR” Executes the given expression on a new, non-booted system
rpc “EXPR” Executes the given expression remotely on the running system
remote Connects to the running system via a remote shell
restart Restarts the running system via a remote command
stop Stops the running system via a remote command
pid Prints the operating system PID of the running system via a remote command
version Prints the release name and version to be booted
Once after installing the service, i can i was unable to attach to elixir shell.
Can you please guide me in doing the same
1 Like
Hello! I was able to succesfully install a service a conect to it remotelly on a Windows box; when I get to my machine I may be able to reproduce steps (the release docs covered most of what I wanted to do).
I also had some trouble completelly removing the service from the machine (had to completelly remove erlang proceses from Windows).
Ok I was able to get to my Windows machine
and was able to succesfully install a Windows service, connect to it remotely and uninstall it.
I oppened a new PowerShell terminal with admin privileges and generated a release:
PS C:\Workspace> mix new play
PS C:\Workspace> cd .\play\
PS C:\Workspace\play> mix release
Generated play app
To list all commands:
_build/dev/rel/play/bin/play
Then installed the build as a Windows Service:
PS C:\Workspace\play> .\_build\dev\rel\play\bin\play.bat install
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe: Service play_play added to system.
Service installed but not started. From now on, it must be started and stopped by erlsrv:
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe start play_play
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe stop play_play
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe remove play_play
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe list
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe help
Starting the Service:
PS C:\Workspace\play> C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe start play_play
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe: Service play_play started.
PS C:\Workspace\play> .\_build\dev\rel\play\bin\play remote
This last command opened an iex
shell from where to execute commands:

Finally we can unistall the service by using:
PS C:\Workspace\play> C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe remove play_play
C:\Workspace\play\_build\dev\rel\play\erts-10.3\bin\erlsrv.exe: Service play_play removed from system.
PS C:\Workspace\play>
PS: I remember having troubles removing or reinstalling a Windows Service but I was unable to replicate the issue on my current machine.
1 Like
Thanks.
I am able to attach to the service. Its works
Thanks again
1 Like
No problem!
Windows builds make me very happy 
Hi Chouzar,
A quick question around, this i have executed the steps as above, i am able to install, start, stop, remove a windows service.
But i am unable to attach to service using remote options. The shell opens and immediately closes.
Current my project doesn’t have any crashdump generated to verifiy what is issue with release.
Just to let you know, I have started application with start, start_iex this works as expected.
Hi @abhir2020 I haven’t encountered a crashing shell. Usually not a Windows shell but a “native app” opens when running the command.
You can look for them in the windows search
Are the shell window apps installed on the machine?