BradA points out the use of Assembly.GetExecutingAssembly().Location to find out the path to the executable. One thing to watch out for is that Assembly.GetExecutingAssembly() can return null under some conditions. Off the top of my head, this very likely will happen if you're not running in the default appdomain, or your process was not started by a managed exe....


Tomas Restrepo

Software developer located in Colombia. Sr. PFE at Microsoft.