Assistance needed
Hello all,
I am a poor downtrodden Senior Tech (well..thats how I feel at the moment anyway). Have been using NSIS for +-8 months to convert those pesky batch files to something even my junior engineers couldn't mess up.. then came SALESmen...who saw what I could do and asked a favour...could I create an installer for an offering that installs multiple 3rd party apps silently...no problem I say...and I get it working...THEN they change the goalposts with a live demo ...TOMORROW!!!
Just had to tell the story as I feel a lot of techs and devs will have had the same experience...anyway...goalpost change was to download the installers from an FTP site rather than sending out disks to the client...great, but there are multiple files in the ftp locations.
And here is the question...maybe I am just tired and cranky...inetload is excellent but I can't find a way to download all the files in an FTP location without specifying them individually...please tell me I am missing something and it is easy - either way, I think I will go and apply a hammer to the frontal lobe while I wait for a response. The way my brain is working, some example basic code would help.
Thanks
http + ftp download plug-in
545 posts
Afrow UK: progress bar appears on the banner if file size info is available. May not appera on the short files (<8 kB). Known problem - this is not 'cross page' banner (like nxs is), plug-in returns when download is complitted only (or error occure).
Wishdoctor:
> TOMORROW!!!
Not implemented 🙁
This require ftp 'mput' command, but I don't know (right now) how to handle ftp control and data connections in this case. Needs some investigation.
You can also pack server files to the single archive file and use one of NSIS decompression plug-ins.
Wishdoctor:
> TOMORROW!!!
Not implemented 🙁
This require ftp 'mput' command, but I don't know (right now) how to handle ftp control and data connections in this case. Needs some investigation.
You can also pack server files to the single archive file and use one of NSIS decompression plug-ins.
Don't know if this is a bug or by design but calling the plugin from a Section in /silent mode still brings up "InetLoad plugin" in the details text label at the top.
I'd like to display "Downloading [file]..." (w/ DetailPrint) there instead which just gets overwritten.
-Stu
I'd like to display "Downloading [file]..." (w/ DetailPrint) there instead which just gets overwritten.
-Stu
This is option. You can change this with following code beginning line 832 of InetLoad.cpp
Idea was to left "InetLoad" word somewhere 🙂 May be I'll remove it in the next version (with POST option support, if it will be successfully tested not on my comp only).
And rebuild project (Release).
if(hwndParent != NULL &&
(childwnd = FindWindowEx(hwndParent, NULL, "#32770", NULL)) != NULL)
{
if(!silent) SetDlgItemText(childwnd, 1006, PLUGIN_NAME);
}
else InitCommonControls();
Idea was to left "InetLoad" word somewhere 🙂 May be I'll remove it in the next version (with POST option support, if it will be successfully tested not on my comp only).
Umm I'm using Visual C++ 2003 and I get these errors on compile:
d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(48): error C2365: 'FtpCommandA' : redefinition; previous definition was a 'function'
d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(521): error C2659: '=' : overloaded function as left operand
-Stu
d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(48): error C2365: 'FtpCommandA' : redefinition; previous definition was a 'function'
d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(521): error C2659: '=' : overloaded function as left operand
-Stu
Special build - text for 1006 control as /silent 'some text' option. It looks like NSIS cleans this field before plug-in call, so you cannot use script to set text. Usage sample in the attached file.
Mmm I tried that DLL and I think it's taking 'some text' as a download URL.
If I use /SILENT "blah" [url] download fails but if I use /SILENT [url] it does not fail.
-Stu
If I use /SILENT "blah" [url] download fails but if I use /SILENT [url] it does not fail.
-Stu
Sorry, wrong file 🙁
I need this To Work With InetLoad.
Pass The MessageBox and Quit Code if
Successful?
-MichaelFlya-
What do I Say After Pop $0 to Get it to
Pop $0
MessageBox MB_YESNOCANCEL "Message" IDYES LABEL1 IDNO LABLE2
Quit
Pass The MessageBox and Quit Code if
Successful?
-MichaelFlya-
Pop $R0
StrCmp $R0 ok +3
MessageBox MB_YESNOCANCEL "Message"
Quit
-Stu
StrCmp $R0 ok +3
MessageBox MB_YESNOCANCEL "Message"
Quit
-Stu
Thx Works Well !!
-MichaelFlya-
-MichaelFlya-
Updated - not skips current download if "Enter" key was pressed.
And /SILENT now with text parameter, use
/SILENT ""
to display default "InetLoad plug-in" in the 1006 control (install progress text on the top of the NSIS window).
And /SILENT now with text parameter, use
/SILENT ""
to display default "InetLoad plug-in" in the 1006 control (install progress text on the top of the NSIS window).
Great Thanks Takhir !!! "Enter" Button seems to no longer
be a problem.
(Please help me troubleshoot.)
While in /BANNER mode, on the Banner it will show what I
want, but above the loading bar it just shows "InetLoad
plug-in", I'd rather it be what I want.
I may be wrong, you may have put it in some how. It seems
you need one more text input for the dialog shown above
the details while in the Banner mode. like the Silent mode
now has. If you have it already how would you do it?
I think it is "Set TEXT2DISPLAY to 1006 control". I don't
know how to set that manually. How would I?
-MichaelFlya-
be a problem.
(Please help me troubleshoot.)
While in /BANNER mode, on the Banner it will show what I
want, but above the loading bar it just shows "InetLoad
plug-in", I'd rather it be what I want.
I may be wrong, you may have put it in some how. It seems
you need one more text input for the dialog shown above
the details while in the Banner mode. like the Silent mode
now has. If you have it already how would you do it?
You have two text fields available, can you add three?
InetLoad::load /BANNER "Displays on banner." "Displays on banner." "URL for file" "Directory for file"
I think it is "Set TEXT2DISPLAY to 1006 control". I don't
know how to set that manually. How would I?
-MichaelFlya-
In the Banner or Popup modes this text appears on the background window (NSIS dialog), so user can see: 1) installer's Fileinst page; 2) files installation step - "InetLoad plug-in" text in the 1006 field; 3) Inet file download progress on the popup or banner window. In the NSISdl or Silent modes level (3) is absent and details can be moved to second level, but IMHO this is not realy need for Popup and Banner. And I'd like to left "InetLoad" text somewhere on the screen 😉
It looks like installer (NSIS) clears this field before plug-in call, so it is not possible to set 1006 control text from script - it will be removed.
But, any case, thanks, I'll think about you idea 🙂
It looks like installer (NSIS) clears this field before plug-in call, so it is not possible to set 1006 control text from script - it will be removed.
But, any case, thanks, I'll think about you idea 🙂
Oh ok. It would be nice to say something besides InetLoad
the user doesn't need to see that. On long downloads it is
there for a long time. It is off topic for the installation.
Thank you very much for taking the time to respond. 🙂
Here is an idea that I would need somewhere down the line
and saves time. Your idea is to tell the plug-in to go to a
url then specify it's place on the hard drive to download to.
Then do it again for another file on the same line.
I think you should have another mode that allows you to
tell the plug-in to grab files from one url on the Internet
then without having to type the directory or url again just
specify the files.
so something like this:
or "Directory for file" again, over and over.
I know you can rewrite the name with a second field after
the file, but in this case it could just keep the same name.
Could make one more Switch for those who want to rename
like this:
-MichaelFlya-
the user doesn't need to see that. On long downloads it is
there for a long time. It is off topic for the installation.
Thank you very much for taking the time to respond. 🙂
Here is an idea that I would need somewhere down the line
and saves time. Your idea is to tell the plug-in to go to a
url then specify it's place on the hard drive to download to.
Then do it again for another file on the same line.
I think you should have another mode that allows you to
tell the plug-in to grab files from one url on the Internet
then without having to type the directory or url again just
specify the files.
so something like this:
That way you do not have to say "URL for file"
InetLoad::load /NewSwitch /ExistingSwitch "Text" "Text" "URL" "Directory to download to" "File_01" "File_02" "File_03" "File_04/Etc"
or "Directory for file" again, over and over.
I know you can rewrite the name with a second field after
the file, but in this case it could just keep the same name.
Could make one more Switch for those who want to rename
like this:
"File_01" "Rename" "File_02" "Rename" "File_03" "Rename" "File_04" "Rename/Etc"
-MichaelFlya-
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:Rfloatpt@ftp.ati.com/AdbeRdr70_enu.exe" "AdbeRdr70_enu.exe"
ExecWait '"AdbeRdr70_enu.exe"'
SectionEnd
Section "MainSection" SEC01
SetOutPath $INSTDIR
InetLoad::load "ftp://ftpsdk:Rfloatpt@ftp.ati.com/AdbeRdr70_enu.exe" "AdbeRdr70_enu.exe"
ExecWait '"AdbeRdr70_enu.exe"'
SectionEnd
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 🙂 ):
Section "Dummy Section" SecDummy
SetOutPath $INSTDIR
InetLoad::load "ftp://ftpsdk:Rfloatpt@ftp.ati.com/AdbeRdr70_enu.exe" "AdbeRdr70_enu.exe" /end
ExecWait '"AdbeRdr70_enu.exe"'
SectionEnd
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.
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.
InternetOpen() uses INTERNET_OPEN_TYPE_DIRECT instead of default INTERNET_OPEN_TYPE_PRECONFIG.So this will bypass any proxy?
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.
"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.
"INTERNET_OPEN_TYPE_PRECONFIG - Retrieves the proxy or direct configuration from the registry."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.
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.
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.
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.
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.
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.
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.
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?
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/
2. Afrow UK wrote above about bittorent http://sourceforge.net/projects/xbtt/
Originally posted by TakhirI'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?
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"\ 🙂
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
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
Need some example for an internet updater? Take a look at the "old" NSIS Update Script: http://cvs.sourceforge.net/viewcvs.p...0Update/Attic/
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.
@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.