Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Laptop recommendation for CPA accountant 8 72
pdf convertor 7 65
local administrator password solution 26 75
Hyper-V Export VM failing / Checkpoint Issues 1 19
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
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.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

911 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

21 Experts available now in Live!

Get 1:1 Help Now