Re: Find folder containing app's exe file

Ryan Heath <[email protected]> Fri, 20 Feb 2009 13:16:32 +0100
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
Assembly.GetExecutingAssembly().CodeBase should help.

// Ryan

On Fri, Feb 20, 2009 at 1:05 PM, David Nicholson <[email protected]> wrote:
> I need to find the folder containing the exe file of the running app, so I can launch another exe that was installed there.
>
> Environment.CurrentDirectory depends on the shortcut that launched the app. I know the place in Program Files that my app normally resides in, but the user may have changed that at install time. And the command line may not have a path.
>
> If it's relevant, this is a console application.
>
> Thanks
> David.
>
> ===================================
> View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives
>

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives