Skip to content
⌘ NSIS Forum Archive

Can't Download Using NSISdl

4 posts

masemune#

Can't Download Using NSISdl

Howdy Folks. I can't, for the life of me, download anything from the web. :'(

If anyone has some spare time, help would be much appreciated! I am sorry for the beginner question!

Error Message
Download failed: Unable to open (with weird symbols)

Maybe it has to do with this segment

Section "DOWNLOAD FILENAME FROM WEB"

Push $R0

ClearErrors
Dialer::AttemptConnect
IfErrors noie3

Pop $R0
StrCmp $R0 "online" connected
MessageBox MB_OK|MB_ICONSTOP "Cannot connect to the internet."
Quit ;Remove to make error not fatal

noie3:
; IE3 not installed
MessageBox MB_OK|MB_ICONINFORMATION "Please connect to the internet now."
connected:
Pop $R0
;downloads a file
NSISdl::download http://www.url.com

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

I have attached the entire program.
masemune#
Originally Posted by jpderuiter View Post
You forgot to add the filename to save the file to as parameter.
Ah silly me! Is there a way to automatically take the file name directly from the url?