Solved

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

Posted on 2009-04-01
5
2,232 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Please help me Blue screen window 10 7 61
Undelete of overwritten files 27 84
Special copy setup request 8 50
Problem to Alipay 10 22
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

778 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