![]() |
#161 |
Senior Member
|
${varname},${TEMP1} are not variables. These are defines created during compile time. A variable is declared like so.
Those are variables...code: |
![]() |
![]() |
![]() |
#162 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Actually !define varname $R0 will work also, but unless you have !defined TEMP1 as a variable just like varname then you will get a compiler error.
${varname} -> $R0 -Stu |
![]() |
![]() |
![]() |
#163 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Following code should work. I used state=value for php. You can use MessageBox to check out intermediate results
code: Server reply should appear in the post_reply.htm. |
![]() |
![]() |
![]() |
#164 |
Guest
Posts: n/a
|
Err, this is my code now:
code: It wouldn't run ![]() (If you see "Cracker" and "VIRUS", it's just a game |
![]() |
![]() |
#165 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
I had not your ini file, so I tested script with fixed parameters
code: and found in the success.html aaaaabbbbbcccccddddd1 You can check vars using ;MessageBox MB_OK "login=$var1&password=$var2&cracker=$var3&beschuetzer=$var4&create=1" and ini file content in this pause. |
![]() |
![]() |
![]() |
#166 |
Guest
Posts: n/a
|
Yeah, that runs
But not from InstallOptions >-< |
![]() |
![]() |
#167 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Use !insertmacro MUI_INSTALLOPTIONS_READ instead of ReadINIStr.
-Stu |
![]() |
![]() |
![]() |
#168 | |
Junior Member
Join Date: Feb 2006
Posts: 7
|
Re: testers wanted :)
Quote:
I do have one question. One user has problems with a proxy that requires him to log in. Are there any environment variables that can be set if the plugin isn't picking up the IE proxy settings? Being honest I'm not 100% sure if IE holds these settings for him, the problem report was fairly minimal. http://sourceforge.net/forum/forum.p...orum_id=539405 Thanks for all your hard work Dave |
|
![]() |
![]() |
![]() |
#169 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Good question. Both InetLoad/inetc have the same parameters set including [/PROXY IP:PORT] [/USERNAME PROXY_LOGIN /PASSWORD PROXY_PASSWD] (INTERNET_OPEN_TYPE_PROXY, INTERNET_OPTION_PROXY_USERNAME and INTERNET_OPTION_PROXY_PASSWORD). But for local proxies user-specific values required (if parameters not come with IE pre-sets). Currently I have not information about env. vars for local proxy settings, but on the proxy error plug-in should return "Proxy Error (407)" string in the Pop, this case we can ask user - display custom dialog for login/password. The simplest way I see is plug-in with auth request for 'in section' usage (I wrote this 5 minutes ago, so test it first
![]() Edited And you should handle installer' silent mode in script by skipping dialog in the silent mode. Last edited by Takhir; 5th March 2006 at 13:40. |
![]() |
![]() |
![]() |
#170 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
I updated InetClient plug-in to use WinInet internal authentication dialog for server and proxy auth. request. Tonight I'll add the same changes to InetLoad.
|
![]() |
![]() |
![]() |
#171 |
Junior Member
Join Date: Feb 2006
Posts: 7
|
I'm having an issue with the inetc plugin crashing when using resume and the user clicks cancel on the retry/cancel messagebox. The following script shows the problem.
;-------------------------------- ; General Attributes Name "inetc test" OutFile "inetctest.exe" ShowInstDetails show ;-------------------------------- ;Interface Settings !include "MUI.nsh" !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-colorful.ico" !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_LANGUAGE "English" ;-------------------------------- ;Installer Sections Section "Dummy Section" SecDummy inetc::get /resume "" "http://www.bogus.com/bogus.txt" "$EXEDIR\mirrorlist.html" /END pop $0 detailprint $0 SectionEnd If I use this code instead then it works as expected. inetc::get /popup "" /resume "" "http://www.bogus.com/bogus.txt" "$EXEDIR\mirrorlist.html" /END |
![]() |
![]() |
![]() |
#172 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Could not reproduce this on my XP Pro SP2 + IE 6.0. Not crashes, DetailPrint:
SendRequest Error Completed I'll inspect code later today, but may be you can give me more details about your test (system configuration, etc.)? |
![]() |
![]() |
![]() |
#173 |
Junior Member
Join Date: Feb 2006
Posts: 7
|
Win2k Pro SP4, IE 6.0.2800.1106, NSIS 2.16, AMD Sempron 2600
The annoying thing is if I set a breakpoint at the pushstring in the get function and step with the VS debugger then I don't get a crash either :/ Is it perhaps some sort of timing issue? |
![]() |
![]() |
![]() |
#174 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
please test
I improved few suspicious places, but I still cannot reproduce am not sure in the new version, please test.
|
![]() |
![]() |
![]() |
#175 |
Member
Join Date: May 2006
Location: Devon, UK
Posts: 65
|
Might be a silly question,
If I point this at a url of a webscript such as CF in silent mode, will it execute the script silently? e.g if I pointed it to the url http://localhost/adminAPI/dowork.cfm it'll just execute the script contents without bringing up a browser window? hmm sounds like it would .. I'll have to give it a try. thanks |
![]() |
![]() |
![]() |
#176 | |
Junior Member
Join Date: Feb 2006
Posts: 7
|
Re: please test
Quote:
It looks like it's some sort of stack issue - when it crashes it seems to be executing somewhere random. |
|
![]() |
![]() |
![]() |
#177 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
I have sent personal message with inetc debug build and comments. Crash still not repeats even on W2K with you configuration. Strange thing - plug-in reports about "Server Error" on W2K and "SendRequest Error" on WinXP.
|
![]() |
![]() |
![]() |
#178 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Inetc update: new /CAPTION TEXT parameter (zeeh3 request). Mainly for RESUME message box header in the "old style" output, i.e. if caption not defined and plug-in uses default and english "InetClient plug-in". As a result /POPUP and /SILENT now go without (caption) parameter, and /BANNER has single one (window body text). This not touchs InetLoad yet, may be later, after some test period, so please read wiki page when download new version. Also may be in the SILENT mode plug-in should not display message above progress bar, but for now I left it as it is.
|
![]() |
![]() |
![]() |
#179 |
Junior Member
Join Date: May 2005
Posts: 8
|
I am trying to download a list of files, but something fails, i am probably doing something that is not possible :-)
StrCpy $test '"http://testserver.com/files/tmp.exe" "$TEMP\tmp.exe"' InetLoad::load /popup "test load" $test This is producing nothing, am i doing something real odd, or is this just impossible. My goal is to be able to build a "list" of files to be downloaded. StrCpy $test '"http://testserver.com/files/tmp.exe" "$TEMP\tmp.exe" "http://testserver.com/files/tmp2.exe" "$TEMP\tmp2.exe"' :-) Regards |
![]() |
![]() |
![]() |
#180 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Multiple download sample was tested many times. In your script NSIS might put $test as a single string to stack. Please test "long" command line first (without strcpy) and check exit code.
|
![]() |
![]() |
![]() |
#181 | |
Junior Member
Join Date: May 2005
Posts: 8
|
Quote:
Regards |
|
![]() |
![]() |
![]() |
#182 |
Junior Member
Join Date: Jul 2006
Posts: 47
|
Hi everybody
Is there a way to make the dialog freeze while the download is being made? Currently, the download uses the proxy settings correctly, but the user is able to press "Back", "Next" and "Cancel" and I don't want it to happen. Any idea? Thanks in advance |
![]() |
![]() |
![]() |
#183 |
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You can disable the buttons yourself with GetDlgItem and EnableWindow:
GetDlgItem $R0 $HWNDPARENT 1 EnableWindow $R0 0 GetDlgItem $R0 $HWNDPARENT 2 EnableWindow $R0 0 GetDlgItem $R0 $HWNDPARENT 3 EnableWindow $R0 0 This will disable all three buttons. -Stu |
![]() |
![]() |
![]() |
#184 |
Junior Member
Join Date: Jul 2006
Posts: 47
|
Thanks a lot, now it works just fine!
|
![]() |
![]() |
![]() |
#185 |
Junior Member
Join Date: Aug 2006
Posts: 2
|
Hi.
I'm getting faimilar with inect but I have one questiona, as I cant find answer for it. Is it possible to upload on serwer whole directory structure? Thanks for help |
![]() |
![]() |
![]() |
#186 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
No. Use FindFirst, FindNext, FindClose to scan dir.
|
![]() |
![]() |
![]() |
#187 |
Junior Member
Join Date: Nov 2004
Posts: 4
|
Is the DLL made in .NET ?
|
![]() |
![]() |
![]() |
#188 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Nope, .NET not required. Functions are classic dll entry points (__far __pascal == WINAPI). But you can build project under VS 2005 as well - no difference with VS 6.
|
![]() |
![]() |
![]() |
#189 |
Junior Member
Join Date: Oct 2006
Posts: 2
|
Just got a quick question... I'm using an NSIS installer with the inetload plugin (bloody wonderful plug-in that it is!) to reduce the pain involved in upgrading software on several hundred machines by having the installer download the necessary updates - one of which is the dotNET framework - all 23mb of it. Dialup sites have a bad habit of regularly failing to the point that they can never finish the download in one go.
I'm trying to use the following line of code to silently download (with resume) the update, but in silent mode, resume does not seem to work. It works fine in normal mode, but the problem is that there *isn't* someone watching the machine to click the Retry button. inetload::load /resume "" /silent "Downloading dotNET framekwork..." /popup "Downloading..." "http://172.25.254.151/appupdates/updatepacks/dotnetsilent_adbox.exe" "$OUTDIR\dotnetsilent_adbox.exe" Can anyone give me any ideas how I might resolve this problem? |
![]() |
![]() |
![]() |
#190 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Try to comment line 976 in InetLoad.cpp source code and rebuild project, should be (not tested)
code: |
![]() |
![]() |
![]() |
#191 |
Junior Member
Join Date: Oct 2006
Posts: 2
|
Thanks for your quick suggestion Takhir, however I'm now running in to a problem previously posted on the forum that I can't spot a solution for - namely, I'm getting the following compile errors:-
error C2365: 'FtpCommandA' : redefinition; previous definition was a 'function' (@ line 64) C2659: '=' : overloaded function as left operand (@ line 633) C++ isn't my specialty - I *can* program, but it's not what I do for a living and for that reason, whenever I need to knock something together I either use NSIS or VB. |
![]() |
![]() |
![]() |
#192 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Just replace FtpCommand with myFtpCommand, use "whole word" option on replace. It is important for this line:
code: |
![]() |
![]() |
![]() |
#193 |
Junior Member
Join Date: May 2004
Posts: 43
|
Is it possible to RESUME download of already existing file?
|
![]() |
![]() |
![]() |
#194 | |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Quote:
|
|
![]() |
![]() |
![]() |
#195 |
Junior Member
Join Date: May 2004
Posts: 43
|
That's a pity even though inetc is not a download manager. Still there is another bug not connected with RESUME:
When inetc is called in .onInit installer window is started in background and BringToFront doesn't work afterrwards. The command used is PHP Code:
|
![]() |
![]() |
![]() |
#196 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
NSIS BringToFront manual notes this new OSes behaviour. Use /banner or /popup to keep focus.
|
![]() |
![]() |
![]() |
#197 | |
Junior Member
Join Date: May 2004
Posts: 43
|
I haven't found the instructions. It is said that
Quote:
|
|
![]() |
![]() |
![]() |
#198 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
4.9.14.1 BringToFront
... Recent Windows versions restrict the setting of foreground windows. If the user is working with another application during installation, the user may be notified using a different method." Finally this means that none of SetForegroundWindow, SetActiveWindow, SetWindowPos can sets window to foreground and give it keyboard focus (now). Taskbar button flashes instead. But Inetc sources include commented sf() function - this worked but was removed later. You need to call this directly from installer, may be using System plug-in. |
![]() |
![]() |
![]() |
#199 |
Junior Member
Join Date: May 2004
Posts: 43
|
Still can't get the logic. Installer does not execute any external programs to lose focus - it merely calls a function from DLL. In addition I do not have any recent windows version (W2K only), so this should work for me, but BringToFront doesn't work after a call to inetc.
Maybe there is a misconception in inetc which tries to operate with some of its windows even with the /SILENT switch - this causes installer to lose focus to these windows and they fail to return it back? Could this be possible? |
![]() |
![]() |
![]() |
#200 |
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
This is not Inetc related problem, the same (under some conditions) happen with splash windows, banners and even outside NSIS
![]() Please use forum search - you are not first ![]() |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|