Question: How get current exe dir?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VB Programmer

    Question: How get current exe dir?

    I have a settings file that is in the same dir as my local VB.NET exe
    winform application.

    From my winform application how do I reference the "current directory" to
    access the file?

    NOTE: I don't want to use Environment.Cur rentDirectory because this exe is
    launched locally from a website and Environment.Cur rentDirectory doesn't
    return to me the correct dir.

    Thanks.


  • VB Programmer

    #2
    Re: Question: How get current exe dir?

    I tried Application.Sta rtupPath and it seems to work.

    Thanks.

    "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
    news:O$ApB6C5DH A.1852@TK2MSFTN GP10.phx.gbl...[color=blue]
    > I have a settings file that is in the same dir as my local VB.NET exe
    > winform application.
    >
    > From my winform application how do I reference the "current directory" to
    > access the file?
    >
    > NOTE: I don't want to use Environment.Cur rentDirectory because this exe[/color]
    is[color=blue]
    > launched locally from a website and Environment.Cur rentDirectory doesn't
    > return to me the correct dir.
    >
    > Thanks.
    >
    >[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Question: How get current exe dir?

      * "VB Programmer" <growNO-SPAM@go-intech.com> scripsit:[color=blue]
      > I have a settings file that is in the same dir as my local VB.NET exe
      > winform application.[/color]

      <http://groups.google.c om/groups?selm=uqB 7aj0zDHA.3416%4 0tk2msftngp13.p hx.gbl>

      --
      Herfried K. Wagner [MVP]
      <http://www.mvps.org/dotnet>

      Comment

      Working...