Results 1 to 3 of 3

Thread: [RESOLVED] Shortcuts and App.Path

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Resolved [RESOLVED] Shortcuts and App.Path

    Are there issues with using App.Path in a program when the program will be launched from a shortcut on the desktop? My program can't find a text file that I describe the path as

    VB Code:
    1. App.Path & "/text.txt"
    This is giving me a “Run-time error 53, File not found”. The file is located in the same directory as the executable is and it is named correctly as well. When I launch my program without using the desktop shortcut it runs properly and locates the text file. When I put the text file on the desktop it runs properly from the shortcut.

    Any suggestions?
    CodeBank: Launch IE

  2. #2
    Fanatic Member space_monkey's Avatar
    Join Date
    Apr 2005
    Location
    神と歩くこと
    Posts
    573

    Re: Shortcuts and App.Path

    Shouldn't that be
    VB Code:
    1. App.Path & "\text.txt"

    Prolly just a typo but thought i might point it out.

    Edit: I've tried replicating the issue but i don't see a problem
    Are you sure you are using a shortcut and not a copy of the exe? Cause i can't seem to create a shortcut that will do what you are saying that is doing.
    Last edited by space_monkey; Jan 17th, 2006 at 03:52 PM.
    Using VB6 or VB.net 2008 with .net 3.5
    "Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Re: Shortcuts and App.Path

    You were right I did have it as a forward slash. I had been typing too many URLs...

    EDIT:

    Nevermind...I was missing an App.Path for one of my .txt files



    Thanks...
    Last edited by bat711; Jan 17th, 2006 at 04:22 PM.
    CodeBank: Launch IE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width