[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
Re: VB 2010: Download to location of .exe
Re: VB 2010: Download to location of .exe
Quote:
Originally Posted by
Justa Lol
Application.StartupPath
Thanks man that was exactly what I needed!
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.
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.