1

I need to find a way to retrieve the folder in which my executable is. Since it is a service, the

Poco::Path::current()

returns the current working directory which is the system directory for Windows and the root directory in Linux.

Barzo
  • 1,039
  • 1
  • 11
  • 37
  • and what is your question? –  Nov 10 '16 at 11:04
  • I think is quite clear: "I need to find a way to retrieve the folder in which my executable is" – Barzo Nov 10 '16 at 11:28
  • then Poco::Path::current() should work correctly. Or you can look [this](http://stackoverflow.com/questions/27800532/getting-service-path-to-executable). –  Nov 10 '16 at 12:39

1 Answers1

1

It might be a bit of a pain to pass around your program, but argv[0] in your main() should hold the executable's path.

shpuktzy
  • 33
  • 6