mspocketpc.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how do I get the executable path.

 
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers
Author Message
Wazza



Joined: 23 Feb 2008
Posts: 2

PostPosted: Sat Feb 23, 2008 5:03 am    Post subject: how do I get the executable path. Reply with quote

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

Archived from group: microsoft>public>pocketpc>developer
Back to top
View user's profile Send private message
user



Joined: 15 Aug 2007
Posts: 459

PostPosted: Sat Feb 23, 2008 12:30 pm    Post subject: Re: how do I get the executable path. Reply with quote

#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" wrote in message @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
Back to top
View user's profile Send private message
Robert Scott



Joined: 15 Aug 2007
Posts: 137

PostPosted: Sat Feb 23, 2008 5:41 pm    Post subject: Re: how do I get the executable path. Reply with quote

On Sat, 23 Feb 2008 00:03:02 -0800 (PST), Wazza 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
Back to top
View user's profile Send private message
Wazza



Joined: 23 Feb 2008
Posts: 2

PostPosted: Sat Feb 23, 2008 12:04 pm    Post subject: Re: how do I get the executable path. Reply with quote

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
Back to top
View user's profile Send private message
dbgrick



Joined: 15 Aug 2007
Posts: 173

PostPosted: Mon Feb 25, 2008 12:12 pm    Post subject: Re: how do I get the executable path. Reply with quote

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
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
How do i get the .cab file name and path when I'm creating a CAB file which contains setup.dll. Some people use my application at last year,so they want to downloat it from my website and update it.So that,i must process this case,when installing i have to kill my old program ,but some times ,i can't

How do i get the .cab file name and path when I'm creating a CAB file which contains setup.dll. Some people use my application at last year,so they want to downloat it from my website and update it.So that,i must process this case,when installing i have to kill my old program ,but some times ,i can't

How do i get the .cab file name and path when I'm creating a CAB file which contains setup.dll. Some people use my application at last year,so they want to downloat it from my website and update it.So that,i must process this case,when installing i have to kill my old program ,but some times ,i can't

show path of process am trying to make a process viewer using I am able to show the processid, base address, thread count and the exe name. however, i want to display the full path of the exe file. i understand that

Desktop lookup of sync folder path? Anyone have a snippet of .Net code to lookup the "briefcase" folder path from the desktop so I can place files there from a desktop application intended for sync to the PPC? Thanks, Dave
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group