Solved

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

Posted on 2009-04-01
5
2,249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 48

Accepted Solution

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

Expert Comment

by:Mikal613
ID: 24042295
also

System.Windows.Forms.Application.StartupPath
0
 

Expert Comment

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

Author Closing Comment

by:MartinHouse
ID: 31565476
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
ID: 24066414
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Determining the an SCCM package name from the Package ID
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

726 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