Getting the application's directory from a WPF application
One method:
System.AppDomain.CurrentDomain.BaseDirectory
Another way to do it would be:
System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName)
Here is another:
System.Reflection.Assembly.GetExecutingAssembly().Location
You can also use the first argument of the command line arguments:
String exePath = System.Environment.GetCommandLineArgs()[0]