G'day,

I'm building a pocket PC app using .NET 2.0 I and I wish for my
program to know its "executable path", the directory where its
executable resides.

The usual "Application.ExecutablePath" that I would use in a windows
app does not exist, and Google turned up more noise than signal when I
looked for an alternative.

Any help much appreciated. (both software and developer are lost).

-dm

Re: how do I get the executable path. by ctacke/>

ctacke/>
Sat Feb 23 07:30:20 CST 2008

#1 result from Google by using the following term:

compact framework application.path


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"Wazza" <the.duckman@gmail.com> wrote in message
news:50e40481-6284-4235-a92c-3eef067b1716@71g2000hse.googlegroups.com...
> G'day,
>
> I'm building a pocket PC app using .NET 2.0 I and I wish for my
> program to know its "executable path", the directory where its
> executable resides.
>
> The usual "Application.ExecutablePath" that I would use in a windows
> app does not exist, and Google turned up more noise than signal when I
> looked for an alternative.
>
> Any help much appreciated. (both software and developer are lost).
>
> -dm



Re: how do I get the executable path. by ---

---
Sat Feb 23 07:41:08 CST 2008

On Sat, 23 Feb 2008 00:03:02 -0800 (PST), Wazza <the.duckman@gmail.com> wrote:

>G'day,
>
>I'm building a pocket PC app using .NET 2.0 I and I wish for my
>program to know its "executable path", the directory where its
>executable resides.
>

Use the Win32 function, GetModuleFileName()


Robert Scott
Ypsilanti, Michigan

Re: how do I get the executable path. by Wazza

Wazza
Sat Feb 23 09:04:57 CST 2008

Thanks Chis & Robert,

I had been using "pocket pc" instead of "compact framework" in Google.
its amazing what finding the right buzzword will accomplish.

off to read the friendly artical.

-dm

Re: how do I get the executable path. by dbgrick

dbgrick
Mon Feb 25 09:12:04 CST 2008

Try using the assembly full path and then get the directory. Here is an
example using C#:

string fullPath =
Assembly.GetExecutingAssembly().ManifestModule.FullyQualifiedName;
string exePath = Path.GetDirectoryName(fullPath);

Regards,
Rick D.

"Wazza" wrote:

> Thanks Chis & Robert,
>
> I had been using "pocket pc" instead of "compact framework" in Google.
> its amazing what finding the right buzzword will accomplish.
>
> off to read the friendly artical.
>
> -dm
>