Skip to content
⌘ NSIS Forum Archive

http + ftp download plug-in

545 posts

Yathosho#
having a problem with the following code. works only when i use it without login : password
FTPdl::download "ftp://myLogin:myPassword@ftp.myftp.xx/Clip(15).3gp" "$Desktop\Clip(15).3gp" "" ""
Takhir#edited
Wrong thread or syntax? 🙂

InetLoad::load "ftp://username😛assword@ftp.myftp.xx/Clip(15).3gp" "$Desktop\Clip(15).3gp" /end
vbgunz#
I've currently got the 50 second delay... This happens to my script and to the example enclosed with the InetLoad package. Perhaps the delay has something more to do with the system than the script?

I turned off my AV/SW and FW on XPSP2. Not sure what the cause is... Any ideas? Have anyone solved it yet?
Takhir#
60 sec delay

It looks like "delay on plug-in exit" problem comes from WinInet.dll DETACH state (time_wait). I added fix, vbgunz reported that it works now.
Guest#
Hi ! (sorry if my explanations aren't clear i'm french)

Well, I don't know if this problem has been quoted before.
I'm using InetLoad with MUI to download some files from ftp. There is a focus problem in silent install mode.

Let's say that there is other windows opened when I run the install like explorer, nsis compiler or any other. Each time a file is downloaded in silentmode, the opened windows are focusing each after each. What can i do to avoid that? Did i miss something in the documentation? Because a beginner user will say "hey my pc is going mad!" when he will see the windows changing without doing anything 🙂
Takhir#
Jnum requested this feature (on the first thread page 😉 ), but it looks like most of developers are not happy with it 🙁 OK, I commented "set foreground" call, please test attached version.
And Jnum can use BringToFront NSIS instruction to keep banner foreground 🙂
vbgunz#
Hello Takhir,

If I could make a request it'll be to see an option to add a banner to the default download status window. An option to show a support banner image below the details.

It would be great if the banner could be found either locally on a users drive or preferably linked to on the net somewhere. Is this possible?

Thanks Takhir!
Takhir#
Looking from my corner it would be better to write a new plug-in adding child window with image to INSTFILES (or any other) page (if I correctly understood your idea). Something like AdvSplash (or NewAdvSplash 🙂 ) but for installer pages. This is probably available on custom pages and using InstallOptionsEx (hand cursor and banner link). Another words - this (new plug-in or one of old ones with new option)) may be usefull not only with InetLoad plug-in and not only on the INSTFILES page 😉
vbgunz#
Hello Takhir,

The idea was to add a banner below the InetLoad download status dialog box. It would be a part of that dialog box and wouldn't show up seperately...

The reason behind the idea is pretty simple. Since I have plenty of mirrors in which my files could be downloaded, I would like to try and give credit where credit is due.

Instead of packaging these banners into the installer, it would be nice if they can simply be linked to from a website. In the case a banner from the net doesn't wish to show up, it'll be nice to replace it with a sort of default banner.

The best part is if you can make it possible to click the banner itself so the user can visit the mirror in which they're getting the download.

I hope I made sense. Thank you Takhir, I'd love to hear your idea on this. Perhaps Advanced InetLoad?

🙂
grahama#
Hi Takhir 🙂
is it possible for inetload to show a repeating progress bar when the files are too small to show real progress.
;
In my case, I am downloading an xml file to check for updates. Is it possible for the progress bar to show a repeating or indeterminate time to download the file ? That way you would not have to use nxs or msibanner for small downloads of this type....
g
Takhir#
Hi grahama!
>The idea was to add a banner below the InetLoad download
>status dialog box. It would be a part of that dialog box
>and wouldn't show up seperately...

IMHO this is element of browser window, one level higher then InetLoad stays 🙂

>is it possible for inetload to show a repeating progress
>bar when the files are too small to show real progress.

What base can you offer for progress bar position if a whole file comes from server with a single message? Time stamps? Or number of files downloaded (may be interesting 🙂 )?
/POPUP window (now with translation - see wiki page ) shows total download time.
grahama#
Hi Tahkir
;
In my case, the first 'non-eyecandy/useful' thing the user sees is a banner stating...checking for updates...please wait.
;
InetLoad downloads an xml file created from a php/mysql query. And, msibanner is faking progress of that query and download.
Specifically, I move Msibanner forward 10 Times to 50%, inetLoad [silent mode] the file, and then move Msibanner forwards 10 Times to 100%. Very Kludgy but it works.
;
Usually, the query takes longer than the file download.
If InetLoad could simulate a spinning/repeating/connecting to database graphic then I would not need msibanner or nxs [which I will use in all future version as it is way better than msibanner 🙂].
;
So there really is no file size or timestamp. Basically, you are waiting for mysql/php to spit out an answer.
;
I guess that would be an extra parameter within inetLoad...
;
I do use inetLoad for actual files too. And, it works fantastic. Adding a 'Indeterminate' parameter would make it easier to communicate with users when NSIS is talking with php/mysql 🙂
;
does that make more sense ?
;
and, out of curiosity, what is the technical name for 'connecting to database' type progress bars ?
;
thanks for such great work Tahkir 🙂
Guest#
Hi Takhir !

Does your plugin support an https syntax?
e.g. https://www.blahblahblah.com/file_to_download.exe
Because it doesn't work with my script so i'd like to know where the problem come from.
Thx 🙂
Guest#
Since IE removed the format http://username😛assword@site.com/ , is there any other way to log into a website?
Takhir#
Lightning20 & Megiddo_Guest
Can you attach a short script sample to forum post or PM? Looking from my corner both https and site logging should be supported by WinInet API (even if IE not allows this).
Guest#
Well, I'm just trying to download a file from the internet. I tried with http files, ftp files to make sure nothing was wrong in my script, and when I tried to download from e.g. https://www.blah-website.com/myfile.exe, it gives me an downloading error.
Does the problem comes from a missing component on the computer or is it simply unsupported at the moment by your plugin?
Takhir#
Lightning20
Please test attached version, if this is OK, I'll update wiki page.
Guest#
Ok, thanks for your rapidity 🙂
I have tried several times to download this page:
Discover how online advertising with Google Ads can help grow your business. Get customers and sell more with our digital advertising platform.

It didn't work.

I also tried http://adwords.google.com/select/steps.html that automatically redirect to https://adwords.google.com/select/steps.html and it works.
So wininet or the plugin has a problem with the https syntax. It seems it doesn't even manage to connect.
Takhir#
I tested last version (with fixed "Type of service to access parameter") with one https connection and it worked. It looks like your server require additional http header because I see SendRequest error. I'll try to understand this later today. Or may be you know what header required?
Guest#
Sorry I'm a perfect n00b in this domain. I'm just able to write some dummy lines with NSIS 🙂

But you mean that each https server has its own parameters? Each different server will require a modified version of your plugin?
Takhir#
This only means that I not worked with https connections earlier 🙂
With INTERNET_FLAG_SECURE I could download page from your link. Please test attached plug-in.
Lightning21#
Great, it works fine with https, but... (because there's always a but🙂 ) it doesn't work when the https certificate is outdated ! (You know, when ie or firefox asks you if you want to continue or not)

Do you think is it possible to avoid this little problem?

e.g with this link here:
https outdated

If not, I will have to use it as it is.
You already did a lot Takhir thank you 🙂
Takhir#
Ignore_sertificate CN_INVALID & DATE_INVALID as default now, new version is available from the wiki page
Lightning21#
Thank you so very much Takhir ! Thanks to you my boss won't cut my throat ! No i'm joking btw your plugin is great 🙂 Keep up the good work!
Lightning21#
Hi Thakir !

I'm facing a strange problem with https. All works fine on my laptop with xp sp2. I tried on another pc with win xp, and also with one under win2k, the download from an https url with an outdated certificate doesn't work. Do you have an idea where the problem can come from? Is there any programs or libraries needed to be installed for the working-good of your plugin??
Takhir#
I have sent PM to Lightning21 some time ago asking to test my updates, but I have not any replies 🙁 So new version uploaded, I am the only tester, but code changes were local and (I hope) not added new bugs 🙂
Updates:
1. https on Win98 (IE 4.0, 40 bit) now works better with invalid server certificate (sample script with URL included).
2. 403 (Forbidden) error code handling added.
Whilstapork#
Having a problem compiling it - it's expecting a file called exdll.h - is that hiding someplace that I'm unaware of? Doesn't seem to be in the zip file.
Takhir#
exdll.h

Sorry, I forgot that kichik excluded source code from NSIS package. You can take file from latest sources package or just use a file I am attaching to this post (path Contrib\ExDll).