Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   InetLoad + Auth (http://forums.winamp.com/showthread.php?t=248049)

karabey 7th June 2006 02:43

InetLoad + Auth
 
Hi,

I am just working on Inetload with Auth Plugins. Build already something but i have still problem with Authentication

code:
;Installer Sections


Section "seTool3 Update"

; /TITLE - dialog caption, "Proxy authorization" default
; /1LINE - to use instead of "Login" default
; /1LINE - to use instead of "Password" default
; /LOGIN - login string, empty field default

# auth::Ask /TITLE "http://www.mysite.at/file.rar" /1LINE "My Login" /2LINE "My Password" /LOGIN ""

auth::Ask
Pop $0 ; OK or Error string
StrCmp $0 "OK" ISOK
MessageBox MB_OK "User pressed Cancel"
Abort
ISOK:
Pop $0 ; Login field string
Pop $1 ; Password field string
MessageBox MB_OK "Login=$0 Password=$1"

InetLoad::load "http://www.mysite.at/file.rar" "$EXEDIR\file.rar"

Pop $R0 ;Get the return value
StrCmp $R0 "success" +3
MessageBox MB_OK "Download failed: $R0"
Quit

nsisunz::UnzipToLog "$EXEDIR\file.rar" "$INSTDIR"
Pop $R0
StrCmp $R0 "success" +2
DetailPrint "$R0" ;print error message to log

SectionEnd



What am i doing wrong?

Takhir 7th June 2006 06:00

1. last plug-in version recognizes authorization answer (both proxy and server I hope) and displays WinInet (IE) internal Auth dialog, so if you planed to use Auth dialog for this purpose only - just skip it.
2. if you still want use Auth plug-in for proxy authorization, you must add /LOGIN $0 /PASSWORD $1 to InetLoad call.
3. Your code "as it is" returns "404 file not found", so I finally do not understand your problem.

karabey 11th June 2006 05:47

My Problem is that i am beginner and dont understand so much from writing this codes however i try to make something to learn alone..


All times are GMT. The time now is 17:51.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.