To get the working directory where the executable lies (but this does not work for a service or so it seems):

string exePath = System.Windows.Forms.Application.StartupPath;

or alternatively

string cwd = Environment.CurrentDirectory;

Here is the sample output of these for a test application. The application was started in the "D:\Documents" directory but located at "D:\Documents\Devel\Tools\IdeaTester\bin\x86\Debug\IdeaTester.exe"
First the list of methods used: