1

我正在使用 NSIS 创建一个安装程序,它将从 Web 服务器安装文件。我正在使用 NSISdl 插件下载文件,但它们没有下载,它只是说下载失败:打开文件失败。

这是正在下载的部分,我可以在这里遗漏一些东西吗?

 Section "Aquiva"
    ; Set    output path to the installation directory.
    SetOutPath $INSTDIR

    ;Include files from this location, and copy that to the current
    ;out path

    NSISdl::download http://41.78.239.158/Aquiva.exe
Pop $R0 ;Get the return value
  StrCmp $R0 "success" +3
    MessageBox MB_OK "Download failed: $R0"
    Quit

SectionEnd ; end the section
4

1 回答 1

1

您应该inetc为此目的使用:

inetc::get "http://41.78.239.158/Aquiva.exe" "$EXEDIR\Aquiva.exe"
pop $R0
DetailPrint "Result: $R0"

你可以在这里得到

如果您坚持使用NSISdl,您的问题可能是由于未指定目标文件,请尝试以下操作:

NSISdl::download http://41.78.239.158/Aquiva.exe "$INSTDIR\Aquiva.exe"
pop $R0
...
于 2012-08-21T13:12:48.543 回答