Download NSIS文件下载程序

Download NSIS文件下载程序,download,nsis,Download,Nsis,我需要NSIS脚本从互联网下载文件,并执行它。 我读过很多例子,但我仍然不明白怎么做。比如说 NSISdl::download http://www.domain.com/file localfile.exe Pop $R0 ;Get the return value StrCmp $R0 "success" +3 MessageBox MB_OK "Download Failed: $R0" Quit $R0包含有关安装过程的信息(“取消”

我需要NSIS脚本从互联网下载文件,并执行它。 我读过很多例子,但我仍然不明白怎么做。比如说

NSISdl::download http://www.domain.com/file localfile.exe 
    Pop $R0 ;Get the return value 
      StrCmp $R0 "success" +3 
      MessageBox MB_OK "Download Failed: $R0" 
      Quit
$R0包含有关安装过程的信息(“取消”或“成功”)。但我不明白“localfile.exe”是什么?
我需要在程序的哪个部分编写此代码(节或函数)?

localfile.exe是本地系统上保存下载内容的路径:

!include LogicLib.nsh
Section
NSISdl::download "http://cdn.sstatic.net/stackoverflow/img/sprites.png" "$pluginsdir\image.png"
Pop $0
${If} $0 == "success"
    ExecShell "" '"$pluginsdir\image.png"' ;Open image in default application
${Else}
    MessageBox mb_iconstop "Error: $0" ;Show cancel/error message
${EndIf}
SectionEnd

节和函数都包含代码(和插件调用),在节/函数之外只指定安装程序属性。。。