Solved

vb.net function for Path to executing program (equivalent to VB6 App.Path)?

Posted on 2013-05-23
2
675 Views
Last Modified: 2013-05-24
Hi Experts,

I am looking for the vb.net equivalent to the VB6 function, App.Path.

I have tried Application.ExecutablePath, but that gives me something like:
D:\Dev-Ver6.0\VB.NET\working copy root\CIRCLY60\VB.NET\bin\Debug\CIRCLY.EXE

What I am after is:
D:\Dev-Ver6.0\VB.NET\working copy root\CIRCLY60\VB.NET\bin\Debug

I know I could trim off the "\CIRCLY.EXE" part from the end of the string, but I assume there is something more elegant?

Regards,
Leigh
0
Comment
Question by:LeighWardle
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39193139
If this is a Forms app, then you can use Application.StartupPath.
0
 
LVL 1

Author Closing Comment

by:LeighWardle
ID: 39193550
Thanks, kaufmed.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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