Skip to content

Problem when path has spaces  #4

@eagle275

Description

@eagle275

I have used your tool without issue with a small service I wrote and started directly from the build-path of VS ... d:\bla\bla\bin\debug\program.exe

But then my team mate insisted we move the executable into c:\Program Files\bla\bla\program.exe

But when I use RunAsService to install that executable as service I see the path without enclosing double-quotes . but Windows seems to need those to handle path with spaces - because I cannot start the service - windows doesnt even give me the usual "30 seconds for a service to start" - in less than half a second I have Error 1053 ... unable to start service.

Edit: As soon as I move the files to a path without spaces its working again flawlessly. So I guess its not some bug in my program (heck I even could start it from the path with spaces directly from a cmd-window ... So the reason for said error has to be handling of path with spaces in RunAsService - Also the main executable path to RunAsService.exe as well is not handled correctly if it contains spaces .. I checked with other services in my windows installation - if the path contains spaces they all use quotes to encapsulate the path to the executable - while RunAsService does not

Can you do something about announcing directory paths that contain spaces correctly or should we rather avoid spaces in the used directory paths ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions