Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

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

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
LeighWardle
Asked:
LeighWardle
1 Solution
 
käµfm³d 👽Commented:
If this is a Forms app, then you can use Application.StartupPath.
0
 
LeighWardleAuthor Commented:
Thanks, kaufmed.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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