![]() |
#441 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
the command line I'm using is:
Inetc::get /NOPROXY /QUESTION "" /CAPTION "Installing $TITLE" $IS_PROXY_ALLOWED $URL $R3 /END |
![]() |
![]() |
![]() |
#442 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
Anyway - I think I fixed it I've changed dlgProc, case IDCANCEL to be:
case IDCANCEL: if(nocancel) break; if(szQuestion) { msgboxAnswer = MessageBox(hDlg, szQuestion, szCaption, MB_ICONWARNING|MB_YESNO); if (msgboxAnswer == IDNO) break; else if (status == ST_DOWNLOAD) status = ST_CANCELLED; } |
![]() |
![]() |
![]() |
#443 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
ok... now I've fixed it
Sorry for spamming the thread... The former solution wasn't a solution - it did not clear the stack but it returned a wrong status. So please ignore the last fix.
There's a function called inetTransfer which pops pairs of url and file name and downloads them. what I did was to add two lines right after the loop that does that: if (lstrcmpi(url, _T("/end"))==0) pushstring(url); And in cleanup section I removed the status check - so now I always clean the stack. Hope it makes sense to anyone. If you want the fixed version, tell me. J. |
![]() |
![]() |
![]() |
#444 | |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Quote:
If you can send me PM with updated source, I'll merge changes and build new release for wiki. Unfortunatelly I am overloaded with business tasks and had not time to dig into proble, sorry ![]() Takhir |
|
![]() |
![]() |
![]() |
#445 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
What do you use to compile inetc?
When I'm using the inetc.dll out of the box (that is, out of the zip) it works fine in winxp sp2. When I use my x64 (win7) pc with both vs2008 and vs2010 to compile the source code it produces a dll that works in win7 but is not working in winxp sp2 (without any updates/vc++ packs or anything, completely fresh install).
When I try to call inetc: code: it leaves the args on the stack ( /SILENT /CONNECTTIMEOUT 10000 $R0 "image.png" /END) So how do you compile it to be compatible for xp sp2?? Thanks |
![]() |
![]() |
![]() |
#446 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
I compile it in VS 6 on XP or Vista. Resulting DLL depends on msvctr.dll but this is OK. You can change settings in later VS to multithreaded DLL, this case module size should increase, but without dependencies to runtimes. IMHO targetver.h should not produce any conflicts.
|
![]() |
![]() |
![]() |
#447 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
Thanks! that helped... I tried to change to multithreasded DLL but still, it didn't work. So I used VS6 and it works like a charm.
|
![]() |
![]() |
![]() |
#448 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Oups... Sorry, 'multithreaded' only. No 'DLL' and no dependencies to runtimes this case. But any case VS 6 is better way.
|
![]() |
![]() |
![]() |
#449 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
I have now another issue with winxp32 sp2. In win7/vista and others I can redirect from https to http. but in winxp32sp2 I get error Redirection (302). I thought I should add something like:
code: but it didn't work - I'm not that familiar with the code, can you give me some guidance? |
![]() |
![]() |
![]() |
#450 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Inetc already has
#define MY_REDIR_FLAGS INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP | INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS for primary https URL. 'SECURITY_' flags are the same #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP So I guess problem is in this XP settings or in WinInet.dll version supplied with this OS/SP. I am attaching test version with merged code for 'Cancel' issue (because it's not possible to send link in PM ![]() |
![]() |
![]() |
![]() |
#451 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
1. regarding the winint.dll and https->http redirection in xp sp2, I found out this http://support.microsoft.com/kb/907301 issue, and applying the hotfix (which only replaces winint.dll and adds registry key) solves it! the bad news is that wininit.dll is a 'KnownDll' which means it always loaded from Windows\System32 and only OS can update it. I think the only way is to change the redirection to be like XP SP2 wants.
2. regarding the 'cancel' bug - looks good ![]() |
![]() |
![]() |
![]() |
#452 |
Junior Member
Join Date: Oct 2011
Posts: 1
|
Hello Takhir,
First of thanks for the plugin. I however encountered a problem with the FTP PUT functionality of the plugin. It has to do when PUTing files that are in non-existing (on the FTP server) subdirectories. The plugin determines if a FTP PUT upload failed due to a non existing subdirectory and tries to create the necessary subdirectories. However the code that determines non-existing subdirectories relies on the FTP server's response. And I encountered a FTP server where the code in the plugin failed. I attached two images with the different responses by different FTP servers on non-existing directory. Code fix should be easy, around line 528 in inetc.cpp: code: Change to: (or what you prefer) code: I saw a few messages that also had problem with subdirectories and FTP PUT earlier in the thread. Those probably had to do with this as well. |
![]() |
![]() |
![]() |
#453 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Good job, tperquin, than you!
I uploaded new release http://nsis.sourceforge.net/File:Inetc.zip |
![]() |
![]() |
![]() |
#454 |
Junior Member
Join Date: Oct 2011
Posts: 1
|
in .zip lost non-unicode version
|
![]() |
![]() |
![]() |
#455 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Oups... Fixed.
|
![]() |
![]() |
![]() |
#456 |
Junior Member
Join Date: May 2006
Location: Astoria, NY
Posts: 12
|
It seems that inetc, even in a completely silent installer with no splash screen or other plugins, will still steal focus from another app when it is instantiated. Does anyone know of a fix for this?
|
![]() |
![]() |
![]() |
#457 |
Senior Member
Join Date: May 2009
Posts: 152
|
![]()
It looks like inetc::head is corrupting the stack.
code: Please won't someone find my beer? |
![]() |
![]() |
![]() |
#458 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
Zinthose, try putting /END as the last argument to tell inetc where is the end of your argument list:
inetc::head "http://download.macromedia.com/pub/flashplayer/current/install_flash_player_ax_32bit.exe" "$TEMP\Temp.dat" /END |
![]() |
![]() |
![]() |
#459 |
Senior Member
Join Date: May 2009
Posts: 152
|
You found my beer!
Weird bug though... need a tinfoil hat for this one. ![]() |
![]() |
![]() |
![]() |
#460 |
Junior Member
Join Date: Feb 2008
Posts: 34
|
![]()
Hello!
Since I wrote the last time into this thread the plugin is working like a charm, so thanks a lot first! I have only two little feature request regarding the detail button and the information which are being displayed. 1. Is it possible not to grey the button out, but instead to make it pushable and print the downloading information into the textarea on each refresh? Example: <filename>: 14071kb (6%) of 234523kb @ 1543.0kb/s (2 seconds remaining) <filename>: 32833kb (14%) of 234523kb @ 1543.0kb/s (2 seconds remaining) <filename>: 53940kb (23%) of 234523kb @ 1543.0kb/s (2 seconds remaining) . . . 2. Is there a way to show which file is downloading at the moment, because in my installer there is only the product name displayed on top of the installation bar? Example: Downloading: <filename> [ || || || || || || || || || || || || || || || || || || || || ] Thanks a lot! |
![]() |
![]() |
![]() |
#461 |
Junior Member
Join Date: Feb 2012
Posts: 2
|
Odd Error with Inetc::get
Using the below simple test code at both my work (win7) and home (xp) hosts I get
the error "U" off the stack. I'm using NSIS 2.46 and the latest Inetc plugin from http://nsis.sourceforge.net/Inetc_plug-in. code: The Error appears as so (and no file is downloaded). ![]() |
![]() |
![]() |
![]() |
#462 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
test.md5 38 bytes, status OK. String may be trancated to first char only ('U') if you use Unicode plug-in version with multibyte installer.
|
![]() |
![]() |
![]() |
#463 |
Junior Member
Join Date: Feb 2012
Posts: 2
|
![]()
Yep that was it, drop in the "plugin/Inetc.dll" file (rather than unicode/Inetc.dll) and volia - It works
![]() Cheers for the quick response (as ever!) Takhir! Regards D. |
![]() |
![]() |
![]() |
#464 | |
Junior Member
Join Date: Feb 2008
Posts: 34
|
Quote:
only wanted to say that I solved the "2." by settings the right caption, but point "1." would be really nice if it is possible. ![]() |
|
![]() |
![]() |
![]() |
#465 |
Winamp Dev Team
|
I noticed same issue, at least when using inetc from another process. From what I discovered, to avoid this, WS_EX_NOACTIVATE style should be set in dialog template.
|
![]() |
![]() |
![]() |
#466 |
Junior Member
Join Date: Feb 2008
Posts: 34
|
Hello everyone again,
I got some troubles with the inetc plugin and a low speed http server. After an undefined time the download aborts and a dialog show an error that the connection isn't available. If I press retry the dialog is shown again - so there is a loop which always show the error message and retry/abort. If I press abort the process is aborted as expected. The error is not within the time of 1800 seconds - it appears randomly. I'm using the following call in our NSIS script: code: Thanks a lot! |
![]() |
![]() |
![]() |
#467 | ||
Junior Member
Join Date: Aug 2012
Posts: 3
|
Quote:
From MSDN: Quote:
Last edited by negativesir; 21st August 2012 at 07:02. |
||
![]() |
![]() |
![]() |
#468 |
Major Dude
|
[OT] Thanks for the fix, but seriously you are using Visual C++ 6.0 and Win 95 ??? [/OT]
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
![]() |
![]() |
![]() |
#469 |
Junior Member
Join Date: Aug 2012
Posts: 3
|
Yea. NSIS supports Windows 95 or higher. If I compile the source with anything higher than Visual C++ 6.0, the resulting DLL will not work on Windows 95. I have a Virtual PC Windows 95 image which makes it easy and I just had to downloaded Visual C++ 6.0. I compiled on Windows 7 and copied it over to the VM and tested the installer with the DLL.
|
![]() |
![]() |
![]() |
#470 | |
Major Dude
|
Quote:
Thanks for explanation, nice job. I assume nobody uses version below Windows 2000 and also Microsoft does not support such old versions any more. [/OT] Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
|
![]() |
![]() |
![]() |
#471 |
Junior Member
Join Date: Aug 2012
Posts: 3
|
I don't doubt that. I know Microsoft doesn't support Windows 9X but NSIS does! Let me put it this way, I have a duty.. no a.. moral obligation.. to ensure that my patch does not break the minimum OS requirements.
|
![]() |
![]() |
![]() |
#472 |
Major Dude
|
Like!!!
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
![]() |
![]() |
![]() |
#473 |
Junior Member
Join Date: Sep 2012
Posts: 22
|
For me it's not showing any window with download information which is very annoying..
|
![]() |
![]() |
![]() |
#474 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Where are you calling the plug-in from? To show download progress you probably need to use it in a Section (and without /silent).
Stu |
![]() |
![]() |
![]() |
#475 |
Junior Member
Join Date: Feb 2011
Posts: 38
|
Can I resolve the filename from the request with inetc?
I have a url which I download a file from during install, this url is using redirection and the name of the file is based on some of the get parameters I use. Anyway, is there a way to use inetc to use/extract the filename from the last redirection in the redirection chains and use that as the filename? I have no problem do the change myself and try it, but I don't have to much experience with wininet api.
BTW - When I put the url in the browser (e.g. chrome) address bar it automatically uses the correct filename to save the file - this is the behaviour I would like to implement. Thanks |
![]() |
![]() |
![]() |
#476 | |
Junior Member
Join Date: Dec 2012
Posts: 6
|
Quote:
Takhir, are you planning to include this fix into new version? |
|
![]() |
![]() |
![]() |
#477 |
Junior Member
Join Date: May 2013
Posts: 1
|
Hey guys,
Just a disclaimer, I'm still new to NSIS in general The INETC plugin seems to work very well in general, although I'm having an issue which appears to be intermittent.. Basically i am attempting to retrieve a large number of files, approx 2 GB in size spread over 150 files and the transfer of some files are failing intermittently. I am using the /resume switch and when the failure occurs it takes place somewhere in the middle of a file transfer, when I click on resume, I right away get the same popup coming up asking if i want to resume or cancel. If i close up the installation package entirely, it will usually go through that file no issue but then fail on another. I'm not seeing any patterns as to specific files failing over and over again, it looks like its completely random. I thought it might be network related so i ran wireshark to verify if the outbound httpd request goes through and it does.. Also, if i cancel that specific file the next few files go through without issue and since they are all retrieving from the same web server i don't believe its network related. I'm not sure where to look to get this resolved, can i enable any additional logging? I can post the script if necessary Thanks in advance |
![]() |
![]() |
![]() |
#478 |
Major Dude
|
Is there any safe way how to detect the source of the problem when downloading file fails (inetc::get) ?
Sometimes I am getting ERR_SENDREQUEST which is "SendRequest Error" but I cannot found the problem. Here is code: PHP Code:
Cool looking installers with custom design: www.graphical-installer.com Create Setup Pages easily: www.install-designer.com Build installers in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com |
![]() |
![]() |
![]() |
#479 |
Junior Member
Join Date: Jun 2013
Posts: 4
|
Hi,
I'm trying to use inetc to download files. I allow users to cancel the download, and to try to download the file a second time. I use the following code: code: This does not work, most likely because when the download is interrupted by the user (closing the download pop-up) the half-downloaded-file cannot be deleted. It is also impossible to delete the file manually for as long as the installer is running ("Another program is using this file"). Edit: I get the same issue in other modes (besides banner mode) when clicking the cancel button. It seems like cancelled downloads are not properly handled -- the downloaded files are never closed. Then again it might just be that I have forgotten some essential operation. |
![]() |
![]() |
![]() |
#480 |
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
inetc automatically deletes the file on dl cancel; why it doesn't in your case, it's hard to say. Does the problem persist with some other file from a different server? Try using Unlocker to see if some 3rd party sw is hijacking the file. If you can't resolve the problem, a workaround can be to use GetTempFileName for the destination, then move the completed dl to target dir.
PostEnd: |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|