Very nice POPUP dialog. I wonder if it is possible to embed it somehow into main window?
http + ftp download plug-in
545 posts
This is NOT implemented in current version. But if you know C, you can change parent window for POPUP here
toif((hDlg = CreateDialog(g_hInstance,
MAKEINTRESOURCE(szBanner ? IDD_DIALOG2 : (popup ? IDD_DIALOG1 : IDD_DIALOG3)),
(popup ? hwndParent : childwnd), dlgProc)) != NULL)
and to change POPUP dialog properties to 'child' and 'no frame'. May be some other small changes require. After this plug-in shuld work with embedded POPUP window. 😉if((hDlg = CreateDialog(g_hInstance,
MAKEINTRESOURCE(szBanner ? IDD_DIALOG2 : (popup ? IDD_DIALOG1 : IDD_DIALOG3)),
(szBanner ? hwndParent : childwnd), dlgProc)) != NULL)
Thanks, but I'll better stick to official version. =)
This /POPUP option caused some unpleasant moments with upgrading an old installer. New obligatory /POPUP parameter caused downloads to fail with "URL Parts Error" after the upgrade. New parameter was omitted in old installers and new inetc still consumed the following option as an argument making the command wrong.
Now if /POPUP "" is specified, the URL field in popup window is empty while it should be not according to docs. I tested this on bundled Example.nsi Can anybody confirm?
BTW, it would be nice to have this URL clickable or copyable for diagnosis of download problems.
P.S. To track the issue the whole inetc history was recreated at Launchpad. https://code.launchpad.net/~techtonik/+junk/inetc
This /POPUP option caused some unpleasant moments with upgrading an old installer. New obligatory /POPUP parameter caused downloads to fail with "URL Parts Error" after the upgrade. New parameter was omitted in old installers and new inetc still consumed the following option as an argument making the command wrong.
Now if /POPUP "" is specified, the URL field in popup window is empty while it should be not according to docs. I tested this on bundled Example.nsi Can anybody confirm?
BTW, it would be nice to have this URL clickable or copyable for diagnosis of download problems.
P.S. To track the issue the whole inetc history was recreated at Launchpad. https://code.launchpad.net/~techtonik/+junk/inetc
Thanks, ********, I updated inetc.zip, now it displays URL if "". This was lost at least half of year ago 🙁
To make URL copyable I should change control type from 'static' to 'edit'. To keep GUI integrity this should be done for all controls on this dialog, tested... New option required for 'clickable' URL.. So.. good idea, may be with next big changes 🙂
I agree, parameters changes (/POPUP with text value) is not good for support, but this happen sometimes...
To make URL copyable I should change control type from 'static' to 'edit'. To keep GUI integrity this should be done for all controls on this dialog, tested... New option required for 'clickable' URL.. So.. good idea, may be with next big changes 🙂
I agree, parameters changes (/POPUP with text value) is not good for support, but this happen sometimes...
I am trying to get your example_unicode.nsi to work with the NSIS 2.38.-1 Unicode, but it does not work 🙁
I am using your original example_unicode.nsi from the latest .zip.
The details window says
Download Status: å‰•âŒæ…瑲â³ç‰…æ½²r, å‰•âŒæ…瑲â³ç‰…æ½²r, å‰•âŒæ…瑲â³ç‰…æ½²r
Completed
I am using your original example_unicode.nsi from the latest .zip.
The details window says
Download Status: å‰•âŒæ…瑲â³ç‰…æ½²r, å‰•âŒæ…瑲â³ç‰…æ½²r, å‰•âŒæ…瑲â³ç‰…æ½²r
Completed
"Download failed: OK" is result of script.
I'm close to getting this implemented, but I keep running into a roadblock at the point at which I need to download the file and write it to the TEMP directory. The script successfully creates the 'receiving' file (jre-6u7-win...exe) that the stream is to be written to, but I am lost as to what happens after that.
The error message I see is "Download failed: OK"
Here is the snippet of code where it fails:
<code> DownloadJRE:
; Call ElevateToAdmin
MessageBox MB_ICONINFORMATION "${PRODUCT_NAME} uses Java Runtime Environment ${JRE_VERSION}, it will now be downloaded and installed."
StrCpy $2 "$TEMP\jre-6u7-windows-i586-p.exe"
inetc::get /PROXY www-proxy.boeing.com:31060 /TIMEOUT=30000 ${JRE_URL} $2 /END
;InetLoad::load /POPUP "JRE downloading..." /TIMEOUT=30000 ${JRE_URL} $2 /END
;nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
Pop $R0 ;Get the return value
StrCmp $R0 "Download successful." +3
MessageBox MB_ICONSTOP "Download failed: $R0"
Abort
ExecWait $2
Delete $2
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
StrCpy $R0 "$R0\bin\${JAVAEXE}"
IfFileExists $R0 0 GoodLuck
Call CheckJREVersion
IfErrors GoodLuck JreFound
; 4) wishing you good luck
GoodLuck:
StrCpy $R0 "${JAVAEXE}"
; MessageBox MB_ICONSTOP "Cannot find appropriate Java Runtime Environment."
; Abort </code>
Thank you for any assistance you can provide.
I'm close to getting this implemented, but I keep running into a roadblock at the point at which I need to download the file and write it to the TEMP directory. The script successfully creates the 'receiving' file (jre-6u7-win...exe) that the stream is to be written to, but I am lost as to what happens after that.
The error message I see is "Download failed: OK"
Here is the snippet of code where it fails:
<code> DownloadJRE:
; Call ElevateToAdmin
MessageBox MB_ICONINFORMATION "${PRODUCT_NAME} uses Java Runtime Environment ${JRE_VERSION}, it will now be downloaded and installed."
StrCpy $2 "$TEMP\jre-6u7-windows-i586-p.exe"
inetc::get /PROXY www-proxy.boeing.com:31060 /TIMEOUT=30000 ${JRE_URL} $2 /END
;InetLoad::load /POPUP "JRE downloading..." /TIMEOUT=30000 ${JRE_URL} $2 /END
;nsisdl::download /TIMEOUT=30000 ${JRE_URL} $2
Pop $R0 ;Get the return value
StrCmp $R0 "Download successful." +3
MessageBox MB_ICONSTOP "Download failed: $R0"
Abort
ExecWait $2
Delete $2
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
StrCpy $R0 "$R0\bin\${JAVAEXE}"
IfFileExists $R0 0 GoodLuck
Call CheckJREVersion
IfErrors GoodLuck JreFound
; 4) wishing you good luck
GoodLuck:
StrCpy $R0 "${JAVAEXE}"
; MessageBox MB_ICONSTOP "Cannot find appropriate Java Runtime Environment."
; Abort </code>
Thank you for any assistance you can provide.
StrCmp $R0 OK +3
Privet
I am downloading a 150 MB file. Everything works amazingly well in Windows XP, but it fails miserably in Windows Vista.
My code:
RequestExecutionLevel admin
InetLoad::load /POPUP " " "http://url.com/file.exe" "$INSTDIR\file.exe"
Any ideas?
I am downloading a 150 MB file. Everything works amazingly well in Windows XP, but it fails miserably in Windows Vista.
My code:
RequestExecutionLevel admin
InetLoad::load /POPUP " " "http://url.com/file.exe" "$INSTDIR\file.exe"
Any ideas?
Vista Home Premium with updates, Kaspersky Internet Security 2009, 69 MB file download from Apache 2.2
works_for_me. NSIS 2.40 exe 1.5 MB download from sourceforge.net is OK too. May be this is your Vista security limitations?Name "InetClient Test"
OutFile "inetc.exe"
RequestExecutionLevel admin
!include "MUI.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section "Dummy Section" SecDummy
SetDetailsView hide
inetc::get /popup " " "http://localhost/css/ltrm2_wwefg_win.exe" "$EXEDIR\light_room.exe" /end
Pop $0
MessageBox MB_OK "Download Status: $0"
SectionEnd
I was confused as I was using InetLoad and you are supporting inetc here 🙂 Can you add a note that inetc is a more up to date version than InetLoad on the InetLoad wiki? I wouldn't have used it in the first place.
I have made some custom modifications to the C code, and it seems that it's some of those that break under Vista for one reason or another. I tested the vanilla version, and there is no problem, so you can disregard my previous message altogether.
I have made some custom modifications to the C code, and it seems that it's some of those that break under Vista for one reason or another. I tested the vanilla version, and there is no problem, so you can disregard my previous message altogether.
Hi,
as i wrote above i cannot get it to work with a NSIS Unicode Build (2.38-1) any Ideas on this? I am building the inetc.exe with the "example_unicode.nsi" from the Zip.
Does anyone else get this to run?
Thanks.
as i wrote above i cannot get it to work with a NSIS Unicode Build (2.38-1) any Ideas on this? I am building the inetc.exe with the "example_unicode.nsi" from the Zip.
Does anyone else get this to run?
Thanks.
Last time I've built and included inetcu.dll to Wiki package in February 2008... Attached version was created from latest (Sept. 1, 2008) sources. Unfortunatelly on new comp I have not NSIS Unicode installed, so attached Unicode plug-in variant is not tested...
Works like a charm, thanks a lot 🙂
Does plugin support FTP-over-HTTP proxy servers?
Thanks a lot
Thanks a lot
Does plugin support FTP-over-HTTP proxy servers?Not worked in my test (Connection Error). Plugin should use IE proxy settings by default, but I also tested manual proxy settings - not helps. Windows XP CLI ftp client not worked as well. Browsers are OK, so probably WinInet.dll has less ftp functionality then IE or Mozilla.
I tested with Windows 7 and IE8 w/ XP SP3 and at least inetc::get worked fine.
Just thought I'd report.
Just thought I'd report.
when used in the .onInit function, inetc prevents the main installer window from being shown in the forefront.
I guess that this is because you create a dialog, even when the /silent option is passed, and that dialog must become the forefront one (even when displayed as SW_HIDE), and then when the installer shows its dialog, it can't bring it to front.
Any way this could get fixed?
I guess that this is because you create a dialog, even when the /silent option is passed, and that dialog must become the forefront one (even when displayed as SW_HIDE), and then when the installer shows its dialog, it can't bring it to front.
Any way this could get fixed?
Just found an interesting problem using this plugin on a machine. I am still doing tests but here's the situation:
Running the installer in the place of userinit.exe (meaning it runs before userinit.exe is executed and therefore before explorer.exe).
The plugin downloads the Adobe Flash Player ActiveX plugin for Internet Explorer. It gets to 100% and then the installer freezes. Soon after this the entire machine freezes, first being the task bar followed by the desktop and then any other programs running (for example, LogMeIn also stops functioning).
Hopefully it is this machine that is the problem, but either way do you see any possible reasons for this?
Edit: It was happening during silent install as well but I have only found it is the plugin by running in non silent mode - or rather I assume it is the plugin as it still shows the downloading progress bar at 100%.
Stu
Running the installer in the place of userinit.exe (meaning it runs before userinit.exe is executed and therefore before explorer.exe).
The plugin downloads the Adobe Flash Player ActiveX plugin for Internet Explorer. It gets to 100% and then the installer freezes. Soon after this the entire machine freezes, first being the task bar followed by the desktop and then any other programs running (for example, LogMeIn also stops functioning).
Hopefully it is this machine that is the problem, but either way do you see any possible reasons for this?
Edit: It was happening during silent install as well but I have only found it is the plugin by running in non silent mode - or rather I assume it is the plugin as it still shows the downloading progress bar at 100%.
Stu
gudy: thanks, but this is very long story of attempts to keep installer foreground in such situations. BTW the same problem has place with few other plug-ins. I can test fixes if you have ideas. Might be good to have solution for both silent and not silent modes.
Afrow: I am not realy understand when plug-in was running. If we are talking about calling this dll from Windows service (i.e. from SESSION, not from Desktop) - I never tested ths mode. I only can say that task bar and desktop are Windows Explorer subsystems, they freezes when Explorer is (almost) died.
Afrow: I am not realy understand when plug-in was running. If we are talking about calling this dll from Windows service (i.e. from SESSION, not from Desktop) - I never tested ths mode. I only can say that task bar and desktop are Windows Explorer subsystems, they freezes when Explorer is (almost) died.
It appears to be a problem with the machine so sorry about that!
Stu
Stu
Hi there,
Do you have any experience with checking the hostname inside the CN field of a server certificate?
One of the checks that I need to have is that the server name inside the certificate ends in the correct domain. Of course, this would be in addition to the checks that wininet would do for you, which is that the name of the server connected to is the same as that in the CN field of the cert from the server, and that the cert is issued by a trusted authority.
I'm guessing that the easiest way to do this is to probably call InternetQueryOption just after InternetConnect, with the parameter INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT , which would return a INTERNET_CERTIFICATE_INFO struct. The lpszSubjectInfo member should contain the information I need, once I figure out how to tear it apart. What do you think?
I was thinking that the domain that I'd be checking for would be passed in as a parameter.
What would be the process for having this submitted back to you so that it could be included in the standard release?
Do you have any experience with checking the hostname inside the CN field of a server certificate?
One of the checks that I need to have is that the server name inside the certificate ends in the correct domain. Of course, this would be in addition to the checks that wininet would do for you, which is that the name of the server connected to is the same as that in the CN field of the cert from the server, and that the cert is issued by a trusted authority.
I'm guessing that the easiest way to do this is to probably call InternetQueryOption just after InternetConnect, with the parameter INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT , which would return a INTERNET_CERTIFICATE_INFO struct. The lpszSubjectInfo member should contain the information I need, once I figure out how to tear it apart. What do you think?
I was thinking that the domain that I'd be checking for would be passed in as a parameter.
What would be the process for having this submitted back to you so that it could be included in the standard release?
This is first request for server certificate fields verification, IMHO no sence to overload plug-in with seldom used features. But you can create your own version of plug-in with this feature and even add it to NSIS wiki 😉
Hi,
is there a way, or will there be a way, to start the download in async. mode.
Right now, i copy wget and start it async. with ExecDos,
but using InetLoad would look much better.
is there a way, or will there be a way, to start the download in async. mode.
Right now, i copy wget and start it async. with ExecDos,
but using InetLoad would look much better.
Right now - no 🙁.
Is there an updated unicode build, you can probably include both call the unicode one 'inetcu.dll' or something.
McAfee trojan alert for inetload.dll
Has anyone else had any problems with McAfee Virus scanning whining about the Inetload DLL having a 'generic!bg.hpk' virus?
It's deleted my inetload.dll and broke my build but has been working for ages up until now. Perhaps McAfee has updated the virus definitions and only picked up on this today.
Has anyone else had any problems with McAfee Virus scanning whining about the Inetload DLL having a 'generic!bg.hpk' virus?
It's deleted my inetload.dll and broke my build but has been working for ages up until now. Perhaps McAfee has updated the virus definitions and only picked up on this today.
garygumdrops: There are many posts about such problems. Search before you post, please.
Please report false positives: http://www.mcafee.com/us/threat_cent...spute_form.asp
Look at: http://nsis.sourceforge.net/NSIS_False_Positives
Look at: http://nsis.sourceforge.net/NSIS_False_Positives
Downloading JDK
Hi all,
I have some troubles downloading JRE and JDK from Sun's homepage.
I simply use the following code:
Now this only works with the JRE online installer[1], trying to download JRE offline[2] or JDK offline[3] installer does the following:
The download finishes in just a couple of seconds (although the files aren't that small), exit code is "OK", but the download is obviously not complete.
If I add the /POPUP option, I get a Connection Error.
Can anybody reproduce this and think of an sulotion?
I really like the plugin, please kept up that good work!
Thanks in advance,
morty
Um, how do I add URL correctly?
[1] JRE online
[2] JRE offline
[3] JDK offline
Hi all,
I have some troubles downloading JRE and JDK from Sun's homepage.
I simply use the following code:
where $0 contains the url.
inetc::get $0 "$TEMP\Setup.exe" /END
Pop $0 # return value = exit code, "OK" if OK
DetailPrint "Download result = $0"
Now this only works with the JRE online installer[1], trying to download JRE offline[2] or JDK offline[3] installer does the following:
The download finishes in just a couple of seconds (although the files aren't that small), exit code is "OK", but the download is obviously not complete.
If I add the /POPUP option, I get a Connection Error.
Can anybody reproduce this and think of an sulotion?
I really like the plugin, please kept up that good work!
Thanks in advance,
morty
Um, how do I add URL correctly?
[1] JRE online
[2] JRE offline
[3] JDK offline
Re: Downloading JDK
I tested following script with first of your URLs http://javadl.sun.com/webapps/downlo...BundleId=33787
Please check /POPUP mandatory parameters in your script.
I tested following script with first of your URLs http://javadl.sun.com/webapps/downlo...BundleId=33787
and found 698kB file as a result. When started this exe displays JRE installation window (see attachment).Name "InetClient GET Test"
OutFile "get.exe"
!include "MUI.nsh"
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section "Dummy Section" SecDummy
SetDetailsView hide
; single file, NSISdl-style embedded progress bar with specific cancel button text
inetc::get /canceltext "interrupt!" "http://javadl.sun.com/webapps/download/AutoDL?BundleId=33787" "$EXEDIR\jre.exe" /end
Pop $1
MessageBox MB_OK "Download Status: $1"
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
FunctionEnd
Please check /POPUP mandatory parameters in your script.