Results 1 to 5 of 5

Thread: [RESOLVED] VB 2010: Download to location of .exe

  1. #1
    Lively Member HunterTTP's Avatar
    Join Date
    Jul 12
    Posts
    115

    Resolved [RESOLVED] VB 2010: Download to location of .exe

    Alright so I would like my program to be just an .exe, this means I need it to download the Ionic.Zip.dll inside of the folder (location) that the exe is being ran from. I know how to download it, but I don't know how to get the folder that the .exe is in.

    Links or examples are much appreciated!





    HunterTTP

  2. #2
    Fanatic Member
    Join Date
    Jun 08
    Posts
    963

    Re: VB 2010: Download to location of .exe

    Application.StartupPath

  3. #3
    Lively Member HunterTTP's Avatar
    Join Date
    Jul 12
    Posts
    115

    Resolved Re: VB 2010: Download to location of .exe

    Quote Originally Posted by Justa Lol View Post
    Application.StartupPath
    Thanks man that was exactly what I needed!

  4. #4
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 05
    Location
    Lansing, MI; USA
    Posts
    3,787

    Re: [RESOLVED] VB 2010: Download to location of .exe

    You do realize that if you have a dependency that's not present when the application starts, the app will crash even if the first thing the app does is check for it & download it as needed.
    This is one of the reasons to distribute your app with an installer, the installer can contain all of the needed files and put them where they're needed.
    Currently using: VS 2010 Ultimate on Win7 Ultimate x64.



    CodeBank: All Threads • Colors ComboBox • Fading & Gradient Form • MoveItemListBox/MoveItemListView • MultilineListBox • MenuButton • ToolStripCheckBox • Start with Windows

  5. #5
    Lively Member HunterTTP's Avatar
    Join Date
    Jul 12
    Posts
    115

    Re: [RESOLVED] VB 2010: Download to location of .exe

    Actually the program does not crash until it starts the Private Sub which requires the dependency. So when you click "install" I have it download the dependency with the button click, then start the background worker (which uses the .dll) and it works just fine. The only problem I am having now is I want it to delete the dependency once the background worker is finished. I do not think that is possible because, once the dependency is loaded, it is not unloaded until the program is closed.
    Last edited by HunterTTP; Aug 6th, 2012 at 12:29 PM.

Posting Permissions

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