Old 7th June 2006, 02:43   #1
karabey
Junior Member
 
Join Date: May 2006
Posts: 13
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?
karabey is offline   Reply With Quote
Old 7th June 2006, 06:00   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
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.
Takhir is offline   Reply With Quote
Old 11th June 2006, 05:47   #3
karabey
Junior Member
 
Join Date: May 2006
Posts: 13
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..
karabey 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