Application Path

Hi ,

i am new to VB.net windows application.

How to get the application path of the application.

Thanks in advance




Answer this question

Application Path

  • Sergei Dorogin

    Why are you playing with that Why dont you put the INI file with the Exe itsef so just refer it as "sss.ini" rather than specifying the complete path!

    Best Regards,



  • sandeep437

  • EricSmith

    Hi

    Thanks for your reply.

    My problem is

    In my application i am refering an INI file which is in G:\Test\INI\Test.ini and my application path is G:\Test.

    so instead of hardcoding the path i gave it as

    a= Application.StartupPath & "INI\Test.ini"

    ...........

    code to open the INI file

    ...........

    after deploying my application using Clickonce

    When i run the application from startup menu

    the application path takes the local one(C:\Documents and Settings\user.......)

    is there anything wrong in my code

    Thanks in advance



  • Shawnk

    Please note that I'm not a ClickOnce expert, but - you can check if the application is deployed using ClickOnce:

    http://msdn2.microsoft.com/en-us/library/d8saf4wy.aspx

    ...and if it is, you probably should use the DataDirectory for your data file:

    http://msdn2.microsoft.com/en-us/library/d8saf4wy.aspx

    Best regards,
    Johan Stenberg



  • Application Path