How can I find out the folder where the windows service .exe file is installed dynamically?
Path.GetFullPath(relativePath);
returns a path base
This should give you the path that the executable resides in:
Environment.CurrentDirectory;
If not, you could try:
Directory.GetParent(Assembly.GetEntryAssembly().Location).FullName
A more hacky, but functional way:
Path.GetFullPath("a").TrimEnd('a')
:)