Solved

How do I get my application's executable path using vb.net CF2.0

Posted on 2009-04-01
5
2,220 Views
Last Modified: 2013-12-05
Hi,  there doesn't seem to be a refernce to 'executablepath' in the application namespace on my vb.net app ( where I was expecting to find it ).  I'm targetting Windows Mobile 5.0 and using CF2.0.  Any ideas how I can get my app's executable path ?

Thanks

Mart
0
Comment
Question by:MartinHouse
  • 2
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 125 total points
Comment Utility
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0
 
LVL 48

Expert Comment

by:Mikal613
Comment Utility
also

System.Windows.Forms.Application.StartupPath
0
 

Expert Comment

by:atul21
Comment Utility
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0
 
LVL 1

Author Closing Comment

by:MartinHouse
Comment Utility
Thanks for the answer.  A bit long winded, but it certainly does the job ! :-)  Your 2nd suggested solution does not appear to be available on my system, which probably means that it's not available in the .Net 2 Compact Framwork.

Thanks
0
 

Expert Comment

by:atul21
Comment Utility
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now