pushd %~dp0 @echo off %cd%\nssm.exe install %1 rails "s -p 8000 -e production" %cd%\nssm.exe set %1 AppDirectory %cd%