I have a Windows service that should look for a configuration file in its current directory.
So I use directory.getcurrentdirectiry() but instead of the
directory.getcurrentdirectiry()
Try this:
System.Reflection.Assembly.GetEntryAssembly().Location