Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2276
  • Last Modified:

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

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
MartinHouse
Asked:
MartinHouse
  • 2
  • 2
1 Solution
 
Mikal613Commented:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0
 
Mikal613Commented:
also

System.Windows.Forms.Application.StartupPath
0
 
atul21Commented:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0
 
MartinHouseAuthor Commented:
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
 
atul21Commented:
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now