Archive: CopyFiles from Website?


CopyFiles from Website?
  Hello all, basically what I want to do is this:

CopyFiles "http://www.blabla.com/version.txt" "$TEMP" 

I tried it, but it did not work. Is this possible, or should check out that ftp plug in? Basically I want to make a "Version Checker" for a software app I develop. Once I get this version.txt, I’ll rename it to version.ini, and pull values out of it. What do you think? Thanks.

I was just playing around with that FTP dll, but then it occurred to me that many of my customers have ftp blocked by their firewall. Is there a way I can transfer this file using http or web port 80? Thanks.


Well i used Takhir's plugin, what do you all think about his, is it stable? Thanks.


What's wrong with NSISdl? :/


Originally posted by Lobo Lunar
What's wrong with NSISdl? :/
Thanks Lobo, actually my only problem with NSISdl is that i did not know it existed. But now i do, and its working very well, thanks.

Ok, I now have 2 problems. First, NSISdl was working perfectly at home, but now that i'm at work, its not getting past our proxy server, and giving me the error:

Download failed: HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authoriztion to fulfill the request. Access to the Web Proxy service is denied. )

So i'm back to using Takhir's Plugin, which looks like it may get by proxys a bit better then NSISdl. My problem is now, that the .txt file that i'm trying to download off our website arrives on my desktop via my nsis script with the correct name, but when i open it, instead of it being the 3 line text file i made, it is the "Page can not be displayed" html code.:igor:

Any thoughts? I put the InetLoad.dll in my Plugins folder, and put the other files for Takhir's Plugin (InetLoad.cpp, InetLoad.dsp, InetLoad.dsw, InetLoad.rc, resource.h) in a new folder i made called .\NSIS\Contrib\InetLoad, that was my best guess based on other plugins. Help!


What says Internet Explorer about your link? Is URL correct? What code returns plug-in (OK)? Plug-in not creates any html pages, so text comes from Net, may be from proxy server. Can you test attached version?


Takhir, yes, the text file's contents are overwritten with the "page can not be displayed" message, and the following:

HTTP 407 Proxy Authentication Required - The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. (12209)
Internet Security and Acceleration Server

I'll just attatch the file after it is downloaded, but the text file on our website starts out with this in it:

[Loans]
CurLoans=GPLDMsr112204.txt
[Deposits]
[Mortgage]


My code is this:

InetLoad::load "http://files.fipco.com/updates/gulfpak/GPversion.txt" "$EXEDIR\GPversion.txt"


Pop $0
MessageBox MB_OK "$0"
StrCmp $0 "OK" dlok
MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, click OK to abort installation" /SD IDOK
Abort
dlok:
And i do get a return of "OK". Thanks.

With your new inetload.dll (above post), I now get a Proxy Error return for $0. :(


Thanks, Jnum. Google shows few links for this situation, I'll try to understand what happens :(
It looks like "INTERNET_OPEN_TYPE_PRECONFIG (Retrieves the proxy or direct configuration from the registry)" is not enougth..


I recommend you use Lobo Lunar's Internet plugin from http://www.lobo-lunar.com/nsis to check that the URL is valid or not already.

Something like this:
Internet::GetUrlCode "hmd.hostileintent.org" "file.txt" $0
StrCmp $0 200 +3
MessageBox "URL is broken!"
Abort

If you have dynamically changing URL's you can use this function to cut a URL into the correct segments for use with the plugin.
I.e. http://www.web.com/files/file.ext => "www.web.com" "files/file.ext"

-Stu