mtkennerly / shawl

Windows service wrapper for arbitrary commands
MIT License
520 stars 15 forks source link

Spaces in the Path to shawl.exe and service.exe does'nt work #54

Closed thomasX closed 2 months ago

thomasX commented 2 months ago

if i try to create a Service with the following script:

sc create my-app binPath= "C:\Program Files\mydir\shawl.exe run --name my-app -- C:\Program Files\mydir\ma-app.bat"

when i try to start the service, i get the Error 2 : The system cannot find the file specified

if i create the service with the following script: sc create my-app binPath= "C:\Program Files\mydir\shawl.exe run --name my-app -- C:\ma-app.bat"

everything is OK

mtkennerly commented 2 months ago

Hi! You can fix this by adding inner escaped quotes. This works for me in Command Prompt:

sc create my-app binPath= "\"C:\Program Files\mydir\shawl.exe\" run --name my-app -- \"C:\Program Files\mydir\ma-app.bat\""