DaedalusAlpha
DaedalusAlpha

Reputation: 1737

Windows Service failes to start with "Path '.' not found"

Disclaimer: the error message is translated from Swedish (and it's a pain to find the exact corresponding error message in English, Microsoft take note...) The error message could also be "Path ' ' not found" or "Path not found". It's a bit unclear due to the Swedish message not enclosing the path in ' '.

This is similar to this question, but not exactly: New Windows Service installed, fails to start: "System error 2 ... system cannot find the file specified"

I have written the service myself. It is an exe written in unmanaged C++ and is using the following external code:

The problem I'm having is that it doesn't start when Windows starts, but it does start if I manually start it! I am stumped as to what could be wrong. The only thing I can think of is if perhaps the dll can't be found, but I don't know why it wouldn't. Something with the environment variables being different perhaps?

What I have tried:

Upvotes: 1

Views: 998

Answers (1)

DaedalusAlpha
DaedalusAlpha

Reputation: 1737

For posterity it seems like the delayed start suggested by 51k seems to work. I don't know why that should make any difference, but as long as it works I'm happy.

Upvotes: 1

Related Questions