http + ftp download plug-in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • MuskieMikie
    Junior Member
    • Jun 2005
    • 1

    I'm experiencing the 50 sec delay after inetload downloads the file. This only occurs when downloading from ftp. http is fine.

    Section "MainSection" SEC01
    SetOutPath $INSTDIR
    InetLoad::load "ftp://ftpsdk:[email protected]/AdbeRdr70_enu.exe" "AdbeRdr70_enu.exe"
    ExecWait '"AdbeRdr70_enu.exe"'
    SectionEnd

    Comment

    • Takhir
      Major Dude
      • Feb 2004
      • 1222

      This is second request with 50 sec delay problem, but I still cannot reproduce it. Right now I tested following code and Adobe installation started immediately after download was completed (12.8 MB ):
      code:

      Section "Dummy Section" SecDummy
      SetOutPath $INSTDIR
      InetLoad::load "ftp://ftpsdk:[email protected]/AdbeRdr70_enu.exe" "AdbeRdr70_enu.exe" /end
      ExecWait '"AdbeRdr70_enu.exe"'
      SectionEnd

      Comment

      • Takhir
        Major Dude
        • Feb 2004
        • 1222

        2 new options: /NOCANCEL and /NOPROXY
        First option prevents download from being interupted by user (locks Esc, Alt-F4, Cancel handling).
        Second - disables proxy settings for this connection (if any). InternetOpen() uses INTERNET_OPEN_TYPE_DIRECT instead of default INTERNET_OPEN_TYPE_PRECONFIG.
        Attached Files

        Comment

        • Mæster
          Member
          • Apr 2003
          • 62

          InternetOpen() uses INTERNET_OPEN_TYPE_DIRECT instead of default INTERNET_OPEN_TYPE_PRECONFIG.
          So this will bypass any proxy?

          Comment

          • Takhir
            Major Dude
            • Feb 2004
            • 1222

            Not tested, because I have not proxy at home , but looks simple, and MSDN says this flag "INTERNET_OPEN_TYPE_DIRECT - Resolves all host names locally."
            "INTERNET_OPEN_TYPE_PRECONFIG - Retrieves the proxy or direct configuration from the registry."
            BTW it is possible to disable proxy using HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings ProxyEnable, but plug-in's parameter limits changes with this session only.

            Comment

            • Mæster
              Member
              • Apr 2003
              • 62

              "INTERNET_OPEN_TYPE_PRECONFIG - Retrieves the proxy or direct configuration from the registry."
              BTW it is possible to disable proxy using HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings ProxyEnable, but plug-in's parameter limits changes with this session only.
              Seems, that all that stuff (only) deals with the internet explorer proxy settings. So if the proxy settings are not set within ie (registry) that probably wont work with other external proxies. But thats all theory, I dont have a proxy for myself - so I couldnt test it.

              Because writing an Internet Updater with NSIS I am searching a long time for a nsisdl solution (or something similar) which can handle proxies which are not specified inside the ie settings (in the usually registry keys).

              Regards,
              Mæster.

              Comment

              • Takhir
                Major Dude
                • Feb 2004
                • 1222

                InetLoad uses WinInet API, by default IE proxy settings will be used. But /PROXY "IP:PORT" option (string will be used as a part of INTERNET_PROXY_INFO structure) option can change proxy list for plug-in.

                Comment

                • Megiddo_Guest

                  Can you make it so it won't take the focus ( comes to the front ) every time it downloads a file? I'm making a system that downloads about 6000 (small) files in a row, and it quite effectively keeps you from doing anything else.

                  Comment

                  • Takhir
                    Major Dude
                    • Feb 2004
                    • 1222

                    Megiddo_Guest
                    At the very beginnig this feature was requested by Jnum for silent mode, but I did it for all cases. OK, please test attached version - should be not so annoying in non-silent mode.
                    Attached Files

                    Comment


                    • Is it possible to create something like a patch client to download the latest version using nsis and this plugin? If so can someone maybe give me an hint?

                      Comment

                      • Takhir
                        Major Dude
                        • Feb 2004
                        • 1222

                        1. Create installer without uninstall section, for example Updater.exe with package download and install functionality. Include it to your distribution package, add link to Start menu. Or execute it in the silent mode once a week from your application. It should send request to server with current version number, server can return new package or "no version yet"\
                        2. Afrow UK wrote above about bittorent http://sourceforge.net/projects/xbtt/

                        Comment


                        • Originally posted by Takhir
                          1. Create installer without uninstall section, for example Updater.exe with package download and install functionality. Include it to your distribution package, add link to Start menu. Or execute it in the silent mode once a week from your application. It should send request to server with current version number, server can return new package or "no version yet"\
                          I'd like something like download a text file from a server in which you see the version required and if lower it downloads and installs what's needed, is this possible?

                          Comment

                          • Afrow UK
                            Moderator
                            • Nov 2002
                            • 8434

                            Yeh sure it is!

                            Use InetLoad to download the file, then use FileOpen, FileRead to get the version info out. Remember to use TrimNewLines on the stuff you read in case there are any (new lines). Finally compare read value using StrCmp with value in registry or in define (for example).

                            -Stu

                            Comment

                            • Mæster
                              Member
                              • Apr 2003
                              • 62

                              Need some example for an internet updater? Take a look at the "old" NSIS Update Script: http://cvs.sourceforge.net/viewcvs.p...0Update/Attic/

                              Comment

                              • Mæster
                                Member
                                • Apr 2003
                                • 62

                                Just one thing for better organisation of inetload plugin.
                                @Takhir:
                                Would be great if you just would use the already existing wiki page http://nsis.sourceforge.net/wiki/InetLoad to store the newest version of the initload.zip. Please dont use a link to the forum for the download. I had done those changes to the wiki but i am really unable to find the latest official realease here in the forum in more than 150 replies. A central place for downloading the newest release (the wiki page) is much more better than posting a new reply with a new attachment here in the forum, dont you think so?

                                Thank you, great work as well.

                                Comment

                                Working...
                                X