Doesn't it presume the parent dialog being 300 units wide, though?
http + ftp download plug-in
545 posts
Ah sorry yes that is true.
Stu
Stu
Url parts error
I have a weird error using this plugin: I get a Url Parts error when downloading a certain file. The other files are fine, I tried deleting and reuploading the file, I tried a different file with same filename, so it's a url issue. It only occurs on XP (which I test in a VM). On my native Win7 OS, it works fine.
I have a weird error using this plugin: I get a Url Parts error when downloading a certain file. The other files are fine, I tried deleting and reuploading the file, I tried a different file with same filename, so it's a url issue. It only occurs on XP (which I test in a VM). On my native Win7 OS, it works fine.
Here is my complete script: http://code.google.com/p/sevenupdate...evenUpdate.nsi!insertmacro DownloadFile "http://sevenupdate.com/apps/SevenUpdate/SevenUpdate.Helper.exe" "$INSTDIR\SevenUpdate.Helper.exe"
may be too many quotas? what about inetc::get ${SOURCE} ${DEST} /END ?
Also options should stay before url/file pairs inetc::get /TIMEOUT=30000 /NOPROXY "${SOURCE}" "${DEST}" /END
Also options should stay before url/file pairs inetc::get /TIMEOUT=30000 /NOPROXY "${SOURCE}" "${DEST}" /END
Url Parts error
I am having a similar issue. Did you found out the origin of the problem??Originally Posted by sevenalive View PostI have a weird error using this plugin: I get a Url Parts error when downloading a certain file. The other files are fine, I tried deleting and reuploading the file, I tried a different file with same filename, so it's a url issue. It only occurs on XP (which I test in a VM). On my native Win7 OS, it works fine.
No not yet, I am sure it's related to the plugin and XP because Win7 it works fine. Also I already tried moving the params before the urls, gives me File Open Error instead.
Verify that your "$INSTDIR exists when you start download to this folder.
/BANNER with SilentInstall
Hello,
I use NSIS to run a Java program, so I run it in SilentInstall.
However, before it runs, I check if java.exe is present, if not I download the JRE using Inetc::get.
My issue is that in "SilentInstall silent" mode, the /BANNER or /POPUP do not show the downloading progress windows.
I know this was done on purpose since it is supposed to be "silent", however is there an option or a way to implement that the progress windows shows up, like a /NOSILENT option?
That would be great!
Thanks
Hello,
I use NSIS to run a Java program, so I run it in SilentInstall.
However, before it runs, I check if java.exe is present, if not I download the JRE using Inetc::get.
My issue is that in "SilentInstall silent" mode, the /BANNER or /POPUP do not show the downloading progress windows.
I know this was done on purpose since it is supposed to be "silent", however is there an option or a way to implement that the progress windows shows up, like a /NOSILENT option?
That would be great!
Thanks
You could embed in your silent NSIS launcher another not-silent NSIS installer that would take care of the download part.Originally Posted by bsmith1 View PostHello,
I use NSIS to run a Java program, so I run it in SilentInstall.
However, before it runs, I check if java.exe is present, if not I download the JRE using Inetc::get.
My issue is that in "SilentInstall silent" mode, the /BANNER or /POPUP do not show the downloading progress windows.
I know this was done on purpose since it is supposed to be "silent", however is there an option or a way to implement that the progress windows shows up, like a /NOSILENT option?
That would be great!
Thanks
Thank you Wizou for this workaround. I will give it a try.Originally Posted by Wizou View PostYou could embed in your silent NSIS launcher another not-silent NSIS installer that would take care of the download part.
Cheers
Yes, this is possible to implement, I even tested 'small' changes and found that for installer with /S dialog appears in the center of screen. Looks a bit ugly for silent install, IMHO would be better to move it to the right bottom corner. Or to left top. May be /NOSILENT /POSITION X:Y (percents, pixels?). So we need to understant a full set of options for this feature. Code update for this may take time (and I need to find this time in my schedule 🙁 ).Originally Posted by bsmith1 View PostI know this was done on purpose since it is supposed to be "silent", however is there an option or a way to implement that the progress windows shows up, like a /NOSILENT option?
/RESUME seems buggy for me.
If I enable it without the extra text parameter then the download errors with "connecting". If I add the extra text, then I properly get a pop up, however clicking retry seems to do nothing and the pop up just comes up over and again and the download never resumes, when clicking cancel I get "reget error". Any idea on what could be going on ?
-Using win7 64bit
-compiled non unicode script
-file is in direct download and support resuming (through firefox or download manager)
-no other options used for inetc
-tried disabling device or unplugging cable gives same result
Help appreciated!
If I enable it without the extra text parameter then the download errors with "connecting". If I add the extra text, then I properly get a pop up, however clicking retry seems to do nothing and the pop up just comes up over and again and the download never resumes, when clicking cancel I get "reget error". Any idea on what could be going on ?
-Using win7 64bit
-compiled non unicode script
-file is in direct download and support resuming (through firefox or download manager)
-no other options used for inetc
-tried disabling device or unplugging cable gives same result
Help appreciated!
/RESUME RETRY_QUESTION - parameter is mandatory. On error during download plug-in asks you what to do - continue download or fail with rising some error (reget error in this case). If network cable still disconnected, Resume popup will appears again. Normal behavior is to restore connection (where is my VPN! 🙂 ) and press Resume button after this only.
Thanks for the reply Takhir!
For the parameter: yes I was confused by the existence of a default value. Seeking for example I figured it was used if you use an empty string "" as parameter, problem solved.
However for the pop up, this is exactly my issue, the plugin seems to fail to detect my connection is available again. i.e. after plugging the cable back in and even if internet works perfectly, the pop up with retry/cancel error will keep showing up, refusing to restore the download.
For the parameter: yes I was confused by the existence of a default value. Seeking for example I figured it was used if you use an empty string "" as parameter, problem solved.
However for the pop up, this is exactly my issue, the plugin seems to fail to detect my connection is available again. i.e. after plugging the cable back in and even if internet works perfectly, the pop up with retry/cancel error will keep showing up, refusing to restore the download.
Looks like I owe you an apology. Your files work perfectly. As the history page show (http://nsis.sourceforge.net/File:Inetc.zip) someone else applied modifications on your plugin which caused the bug, using the last version uploaded by yourself (16:04, 13 July 2010) works perfectly. I don't know why/who modified it but you might want to revert it.
Thanks for your awesome work 🙂
Thanks for your awesome work 🙂
Sorry, after reading code 🙂 : Reget error for http means that InternetSetFilePointer() failed with (REST for ftp). So connection itself was already established, but server could not continue download from this position. Dynamic content names, unknown file size in reply, server functionality limitations - what else? Could you reproduce this on another server? On static content/file?
Thanks, Necku, presisely, JohnTHaller added 2 flags "for cleanliness", but "This handle must not have been created with the INTERNET_FLAG_DONT_CACHE or INTERNET_FLAG_NO_CACHE_WRITE value set." Main idea from the very beginning was to add reget support. But I'll think a little is this a bug or feature 🙂. May be well need to rollback inetc version.
You're welcome, I'm happy as long as it works 😁
On a side note I'll pm you the URL I used for tests so you can see by yourself 🙂
On a side note I'll pm you the URL I used for tests so you can see by yourself 🙂
Unfortunatelly I cannot login to sourceforge now (server internal error), so I am attaching patched version here for the moment. New flags will be used if resume option not set only. Necku, if you will have time, please test this 😉
Works like a charm 🙂Originally Posted by Takhir View PostUnfortunatelly I cannot login to sourceforge now (server internal error), so I am attaching patched version here for the moment. New flags will be used if resume option not set only. Necku, if you will have time, please test this 😉
First I'd like to say thanks for the plugin, it looks to be exactly what I've been looking for.
I am having a small issue with inetc::get it works for the most part, but on my server logs it's showing as POST instead of GET.
The version I'm using is the one you posted above on the 14th.
Example:
Section "Dummy Section" SecDummy
inetc::get /USERAGENT "Some Browser" \
"http://somesite.com/somepage.html" "$EXEDIR\somepage.html"
Pop $0
MessageBox MB_OK "Download Status: $0"
SectionEnd
I am having a small issue with inetc::get it works for the most part, but on my server logs it's showing as POST instead of GET.
The version I'm using is the one you posted above on the 14th.
Example:
Section "Dummy Section" SecDummy
inetc::get /USERAGENT "Some Browser" \
"http://somesite.com/somepage.html" "$EXEDIR\somepage.html"
Pop $0
MessageBox MB_OK "Download Status: $0"
SectionEnd
I re-tested 2 last versions and in apache logs I see:
127.0.0.1 - - [25/Feb/2011:19:45:35 +0300] "GET /aut_1986.htm HTTP/1.1" 200 17952
127.0.0.1 - - [25/Feb/2011:19:55:11 +0300] "GET /aut_1986.htm HTTP/1.1" 200 17952
for the following script:
inetc::get /useragent "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)" "http://localhost/aut_1986.htm" "$EXEDIR\aut.html" /end
In code I see 3 situations where POST may have place: 1) inetc:😛ost(); 2) /file ; 3) /NOUNLOAD in previous POST request. Any other ideas?
Latest release is here http://nsis.sourceforge.net/File:Inetc.zip
127.0.0.1 - - [25/Feb/2011:19:45:35 +0300] "GET /aut_1986.htm HTTP/1.1" 200 17952
127.0.0.1 - - [25/Feb/2011:19:55:11 +0300] "GET /aut_1986.htm HTTP/1.1" 200 17952
for the following script:
inetc::get /useragent "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)" "http://localhost/aut_1986.htm" "$EXEDIR\aut.html" /end
In code I see 3 situations where POST may have place: 1) inetc:😛ost(); 2) /file ; 3) /NOUNLOAD in previous POST request. Any other ideas?
Latest release is here http://nsis.sourceforge.net/File:Inetc.zip
Thanks Takhir,
I've tried your example with the latest version and it works fine. My problem appears to be with the agent string I've been trying to use.
Works fine:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)
Causes POST:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET CLR 1.1.4322; InfoPath.2)
I've tried your example with the latest version and it works fine. My problem appears to be with the agent string I've been trying to use.
Works fine:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)
Causes POST:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET CLR 1.1.4322; InfoPath.2)
You are right, cole2k, string size limit 128 chars in current version for user agent. Most of strings in inetc allocated dynamically with size 1k or 8k depending on NSIS build, but not user agent. Most of servers support at least 8kB fields. I'll fix this in next release.
/resume
Dear sirs,
I’m trying to use your plugin with parameter/RESUME
Everything seems to work normally.
We started downloading, then disconnected the network cable, downloading broke and a message requesting to resume/cancel the downloading appeared. We connected the cable, clicked “resume” and downloading continued.
But actually, there is no real downloading. The plugin downloads everything from the start till the moment of break and then continues downloading.
For example, I’m downloading a 600 mb file.
When 200 mb are downloaded, I disconnect the network and then connect it.
The downloading process seems to continue but the progress bar doesn’t move ahead.
Once the plugin downloads those 200 mb once again he continues the further download.
Is this the way the plugin operates or is it an error?
What can we do to resume the downloading from the point of downloading break?
Thank you.
Dear sirs,
I’m trying to use your plugin with parameter/RESUME
Everything seems to work normally.
We started downloading, then disconnected the network cable, downloading broke and a message requesting to resume/cancel the downloading appeared. We connected the cable, clicked “resume” and downloading continued.
But actually, there is no real downloading. The plugin downloads everything from the start till the moment of break and then continues downloading.
For example, I’m downloading a 600 mb file.
When 200 mb are downloaded, I disconnect the network and then connect it.
The downloading process seems to continue but the progress bar doesn’t move ahead.
Once the plugin downloads those 200 mb once again he continues the further download.
Is this the way the plugin operates or is it an error?
What can we do to resume the downloading from the point of downloading break?
Thank you.
Hello,
first of all thanks a lot for that great plugin!
I saw that there is a new release with this resume flag and I tried it by myself. I've the same issue as yyv.
In addition to that there are sometimes errors while downloading files that are bigger in size while there is kaspersky running on that client. The antivirus scanner trys to check the complete file after download and then the inetc.dll is running into a timeout which is not regarding due to an issue of the connection. This problem appears on several systems - windows xp / vista / 7.
Any ideas?
Thanks a lot again and hopefully we will se a lot of updates to this plugin in feature!
first of all thanks a lot for that great plugin!
I saw that there is a new release with this resume flag and I tried it by myself. I've the same issue as yyv.
In addition to that there are sometimes errors while downloading files that are bigger in size while there is kaspersky running on that client. The antivirus scanner trys to check the complete file after download and then the inetc.dll is running into a timeout which is not regarding due to an issue of the connection. This problem appears on several systems - windows xp / vista / 7.
Any ideas?
Thanks a lot again and hopefully we will se a lot of updates to this plugin in feature!
I prepared small patch for reget feature, but we still have this problem on nginx server (apache is OK), so please wait few days.
No ideas about virus protection....
No ideas about virus protection....
@Takhir - what I also found out so far about the "kaspersky issue" is that downloads of the same files in browsers also take for about ~30 seconds till they are finished. During this time the progress bar and the percentage info stucks on 99%,too.
The delay until the Internet Explorer throws an error is much later then of inetc.dll. Maybe it is regarding how the WinInet lib is used of both (please correct me if I'm wrong).
What I have tried so far is to reset the browser settings. Reference to microsoft answer: Download stucks at 99% Solution - still the same issue.
Is there a delay not regarding an connection timeout that can be configured till the download will be aborted?
Thanks a lot again for your fast answer!
The delay until the Internet Explorer throws an error is much later then of inetc.dll. Maybe it is regarding how the WinInet lib is used of both (please correct me if I'm wrong).
What I have tried so far is to reset the browser settings. Reference to microsoft answer: Download stucks at 99% Solution - still the same issue.
Is there a delay not regarding an connection timeout that can be configured till the download will be aborted?
Thanks a lot again for your fast answer!
I looked into your source code and there are a lot of other TIMEOUT settings that can be applied to "hinternet" - and in the past, some of them, weren't implemented.
InternetSetOption(hSession, INTERNET_OPTION_SEND_TIMEOUT, &timeout, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_SEND_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_RECEIVE_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT,
&timeout, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_SEND_TIMEOUT, &timeout,
sizeof(DWORD));
The reason why I did this is, because I tried to increase the timeout and shut down my http server during the download. After that the error message appeared in exaclty the same time.
Maybe it is a bug?!
InternetSetOption(hSession, INTERNET_OPTION_SEND_TIMEOUT, &timeout, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_SEND_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_RECEIVE_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, &timeout,
sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT,
&timeout, sizeof(DWORD));
InternetSetOption(hSession, INTERNET_OPTION_CONTROL_SEND_TIMEOUT, &timeout,
sizeof(DWORD));
The reason why I did this is, because I tried to increase the timeout and shut down my http server during the download. After that the error message appeared in exaclty the same time.
Maybe it is a bug?!
May be. But MSDN says that DATA_SEND/RECEIVE_TIMEOUT related to ftp only. CONTROL_RECEIVE is identical to RECEIVE. So the only flag that can help with big files download via HTTP is INTERNET_OPTION_RECEIVE_TIMEOUT (probably no separation of HTTP header and data).
Currently plug-in can use not default INTERNET_OPTION_CONNECT_TIMEOUT only (if set in parameters - /timeout). I do not remember why it was added in 2005 🙂, but IMHO this option is good. This way we can change IE default setting for connection t/o. If you can test RECEIVE_TIMEOUT flag and confirm that this resolves situation with antivirus (this may be true if Kaspersky catches data before Inetc), I'll add this new option.
Thanks, Takhir
Currently plug-in can use not default INTERNET_OPTION_CONNECT_TIMEOUT only (if set in parameters - /timeout). I do not remember why it was added in 2005 🙂, but IMHO this option is good. This way we can change IE default setting for connection t/o. If you can test RECEIVE_TIMEOUT flag and confirm that this resolves situation with antivirus (this may be true if Kaspersky catches data before Inetc), I'll add this new option.
Thanks, Takhir