Old 1st May 2008, 01:23   #321
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
OK, Found another issue, when authentication is used even if the correct info is provided it displays canceled first time, then when retrying to authenticate it works OK.

here is the sample code used

code:
downloadcrmsi:
StrCpy $CR_Install "$INSTDIR\CRRedist2005_x86.msi"
inetc::get /NOCANCEL "https://xyz.com/CRRedist2005_x86.msi" "$INSTDIR\CRRedist2005_x86.msi"
Pop $1
Dumpstate::debug
${If} $1 == "OK"
Goto installcr
${Else}
MessageBox MB_RETRYCANCEL "Download Failed!" IDRETRY downloadcrmsi
Abort "Crystal Reports Runtime 10.2 Download Failed"
${EndIf}


as can be seen even when correct login is specified i get a download failed box come up, when retry is pressed it connect straight away without asking for authentication
Vytautas is offline   Reply With Quote
Old 2nd May 2008, 07:45   #322
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 206
If it better that if the plugins may support multilanguage. I'm Chinese, some plugins provide a header file to define multilanguge, some not. If all plugins support multilanguage, that is better.

Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.).
Email: 137729898@qq.com
QQ: 137729898
jiake is offline   Reply With Quote
Old 4th May 2008, 07:42   #323
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Vytautas: thanks again! I hope this is fixed now..
jiake: yes, this would be better, but for now you can use /TRANSLATE option for /POPUP and NSISdl mode, /BANNER mode also has text parameters. Use LangString if you want to support few langs in your installer.
Takhir is offline   Reply With Quote
Old 4th May 2008, 08:43   #324
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Thank you Takhir, that indeed seems to have fixed this problem.
Vytautas is offline   Reply With Quote
Old 10th May 2008, 14:26   #325
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
Currently all 3xx errors are treated as redirection. You should add and exception for "304 not modified" status. Users may send "If-None-Match" or "If-Modified-Since" header to check if the file has changed on the server.

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 20th May 2008, 12:13   #326
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
I use Inetc's /RESUME option to display a message when Inetc is unable to download a file. This is useful for users who are still using dial-up connections.

This /RESUME feature no longer works properly. If there is no connection to the internet the plugin now creates an empty file and does not return the "SendRequest Error". My installer then tries to use the empty file and fails because the file is zero bytes long.

The Inetc plugin dated 1 April 2008 is OK - if there is no connection to the internet it returns the "SendRequest Error".

The Inetc plugins dated 30 April, 4 May and 20 May 2008 do not return the "SendRequest Error" if the internet connection is down.
pengyou is offline   Reply With Quote
Old 20th May 2008, 12:26   #327
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Not reproduces. I unplugged LAN cable (ethernet) and resume popup appears as expected. Exit status is SendRequestError.
code:
Inetc::get /RESUME "" "http://kolobok/sfu_3.exe" "$EXEDIR\sfu.exe"
"$EXEDIR\u.jpg"
Pop $0
MessageBox MB_OK "Download Status: $0"

May 20 version.
Attached Images
File Type: gif resume.gif (15.4 KB, 835 views)
Takhir is offline   Reply With Quote
Old 22nd May 2008, 12:58   #328
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 571
The new Inetc plugin, dated 21 May 2008, fixes the problem so my installer now works properly.

Thank you for fixing this problem so quickly.
pengyou is offline   Reply With Quote
Old 12th July 2008, 18:55   #329
daisywheel
Junior Member
 
Join Date: May 2007
Posts: 40
/SILENT doesn't work

Hi,

Take a look at code below.
code:

Name "test"
OutFile "test.exe"

;SilentInstall silent

!define UpdateConfigFile "update.ini"
!define UpdateURL "http://www.daisywheel.kiev.ua" ;


;---------------------------------------------------------------------------------
; Sections
;---------------------------------------------------------------------------------
Section

loop:

MessageBox MB_OK "hi!"

InetLoad::load /SILENT "${UpdateURL}/${UpdateConfigFile}" "$TEMP\${UpdateConfigFile}"
;InetLoad::load "${UpdateURL}/${UpdateConfigFile}" "$TEMP\${UpdateConfigFile}"
Pop $0
MessageBox MB_OK $0

StrCmp $0 "OK" 0 loop


SectionEnd



When I add /SILENT to InetLoad::load call I get not "OK" response but "connecting" and file is not loaded.

Is it a bug or do I misinterpret something?

tnx,
Roman
daisywheel is offline   Reply With Quote
Old 14th July 2008, 07:40   #330
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Please not /silent option description:
[/SILENT TEXT2DISPLAY]
SILENT
Key hides plug-in' output (both popup dialog and embedded progress bar). Sets TEXT2DISPLAY to 1006 control, if /silent "" - displays "InetLoad plug-in" default. Not required if 'SilentInstall silent' mode was defined in script (NSIS 2.03 option).
Takhir is offline   Reply With Quote
Old 29th August 2008, 15:25   #331
********
Junior Member
 
Join Date: May 2004
Posts: 43
Very nice POPUP dialog. I wonder if it is possible to embed it somehow into main window?
******** is offline   Reply With Quote
Old 1st September 2008, 07:22   #332
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
This is NOT implemented in current version. But if you know C, you can change parent window for POPUP here
code:
if((hDlg = CreateDialog(g_hInstance,
MAKEINTRESOURCE(szBanner ? IDD_DIALOG2 : (popup ? IDD_DIALOG1 : IDD_DIALOG3)),
(popup ? hwndParent : childwnd), dlgProc)) != NULL)

to
code:
if((hDlg = CreateDialog(g_hInstance,
MAKEINTRESOURCE(szBanner ? IDD_DIALOG2 : (popup ? IDD_DIALOG1 : IDD_DIALOG3)),
(szBanner ? 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.
Takhir is offline   Reply With Quote
Old 1st September 2008, 11:32   #333
********
Junior Member
 
Join Date: May 2004
Posts: 43
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

Last edited by ********; 1st September 2008 at 13:23.
******** is offline   Reply With Quote
Old 1st September 2008, 13:51   #334
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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...

Last edited by Takhir; 1st September 2008 at 14:09.
Takhir is offline   Reply With Quote
Old 11th September 2008, 21:23   #335
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
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
xbarns is offline   Reply With Quote
Old 7th October 2008, 22:03   #336
vbplayr2000
Junior Member
 
Join Date: Oct 2008
Location: Federal Way, WA
Posts: 3
"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.
vbplayr2000 is offline   Reply With Quote
Old 8th October 2008, 13:01   #337
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
StrCmp $R0 OK +3
Takhir is offline   Reply With Quote
Old 4th November 2008, 01:22   #338
Ivan Andreevich
Junior Member
 
Join Date: Nov 2003
Location: Vancouver, BC
Posts: 48
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?
Ivan Andreevich is offline   Reply With Quote
Old 5th November 2008, 17:51   #339
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Vista Home Premium with updates, Kaspersky Internet Security 2009, 69 MB file download from Apache 2.2
code:
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

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?
Takhir is offline   Reply With Quote
Old 5th November 2008, 19:31   #340
Ivan Andreevich
Junior Member
 
Join Date: Nov 2003
Location: Vancouver, BC
Posts: 48
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.
Ivan Andreevich is offline   Reply With Quote
Old 1st December 2008, 14:29   #341
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
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.
xbarns is offline   Reply With Quote
Old 1st December 2008, 16:47   #342
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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...
Attached Files
File Type: zip inetc.zip (10.3 KB, 649 views)
Takhir is offline   Reply With Quote
Old 1st December 2008, 17:25   #343
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
Thumbs up

Works like a charm, thanks a lot
xbarns is offline   Reply With Quote
Old 15th January 2009, 12:50   #344
zxn
Junior Member
 
Join Date: Jan 2009
Posts: 1
Does plugin support FTP-over-HTTP proxy servers?

Thanks a lot
zxn is offline   Reply With Quote
Old 16th January 2009, 07:50   #345
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Quote:
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.
Takhir is offline   Reply With Quote
Old 19th January 2009, 08:39   #346
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
I tested with Windows 7 and IE8 w/ XP SP3 and at least inetc::get worked fine.

Just thought I'd report.
redxii is offline   Reply With Quote
Old 5th June 2009, 03:16   #347
gudy
Junior Member
 
Join Date: Jun 2009
Posts: 1
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?
gudy is offline   Reply With Quote
Old 18th June 2009, 19:19   #348
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 19th June 2009, 11:26   #349
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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.
Takhir is offline   Reply With Quote
Old 20th June 2009, 16:41   #350
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
It appears to be a problem with the machine so sorry about that!

Stu
Afrow UK is offline   Reply With Quote
Old 16th July 2009, 14:22   #351
nachoesmith
Junior Member
 
Join Date: Jul 2009
Posts: 1
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?
nachoesmith is offline   Reply With Quote
Old 16th July 2009, 19:15   #352
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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
Takhir is offline   Reply With Quote
Old 26th August 2009, 10:58   #353
spidercc
Junior Member
 
Join Date: Aug 2009
Posts: 1
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.
spidercc is offline   Reply With Quote
Old 26th August 2009, 12:27   #354
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Right now - no .
Takhir is offline   Reply With Quote
Old 5th October 2009, 21:13   #355
redxii
Senior Member
 
Join Date: Nov 2005
Posts: 115
Is there an updated unicode build, you can probably include both call the unicode one 'inetcu.dll' or something.
redxii is offline   Reply With Quote
Old 23rd November 2009, 20:09   #356
garygumdrops
Junior Member
 
Join Date: May 2008
Location: Auckland, New Zealand
Posts: 6
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.
garygumdrops is offline   Reply With Quote
Old 24th November 2009, 09:41   #357
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
garygumdrops: There are many posts about such problems. Search before you post, please.
MSG is offline   Reply With Quote
Old 24th November 2009, 13:35   #358
stb
Senior Member
 
Join Date: Mar 2004
Location: Germany, Paderborn
Posts: 177
Please report false positives: http://www.mcafee.com/us/threat_cent...spute_form.asp

Look at: http://nsis.sourceforge.net/NSIS_False_Positives
stb is offline   Reply With Quote
Old 1st December 2009, 22:56   #359
morty3
Junior Member
 
Join Date: Dec 2009
Posts: 2
Downloading JDK

Hi all,

I have some troubles downloading JRE and JDK from Sun's homepage.

I simply use the following code:

code:

inetc::get $0 "$TEMP\Setup.exe" /END
Pop $0 # return value = exit code, "OK" if OK
DetailPrint "Download result = $0"



where $0 contains the url.

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
morty3 is offline   Reply With Quote
Old 2nd December 2009, 07:04   #360
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Re: Downloading JDK

I tested following script with first of your URLs http://javadl.sun.com/webapps/downlo...BundleId=33787

code:
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

and found 698kB file as a result. When started this exe displays JRE installation window (see attachment).
Please check /POPUP mandatory parameters in your script.
Attached Images
File Type: gif jre.gif (16.6 KB, 445 views)
Takhir is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump