I have a windows service and I need to create directory to store some info. The directory path must be relative to the windows service exe file. How can get this exe file pa
Instead of using a directory relative to the executable, and therefore needing admin privileges, why not use the common application data directory, which is accessible through
Environment.GetFolderPath(SpecialFolder.CommonApplicationData)
This way your app doesn't need write access to its own install directory, which makes you more secure.