Getting full path for Windows Service
How can I find out the folder where the windows service .exe file is installed dynamically? Path.GetFullPath(relativePath); returns a path based on C:\WINDOWS\system32 directory. However, the XmlDocument.Load(string filename) method appears to be working against relative path inside the directory where the service .exe file is installed to. Try System.Reflection.Assembly.GetEntryAssembly().Location Curtis Yallop Try this: AppDomain.CurrentDomain.BaseDirectory (Just like here: How to find windows service exe path ) Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location)