首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Inno安装程序6.2.1网站下载失败

Inno安装程序6.2.1网站下载失败
EN

Stack Overflow用户
提问于 2022-10-16 03:02:48
回答 1查看 54关注 0票数 0

环境: Inno安装程序6.2.1,Windows 7( Win 10上的相同问题)

我使用了几乎相同的脚本作为开发人员的示例代码(它起作用了)。由于某种原因,我的脚本似乎无法下载。

错误:源文件"C:\Users\ADMINI~1\AppData\Local\Temp\is-MBBKM.tmp\version.txt“不存在。

我尝试将下载位置从temp直接更改为userappdata,但却出现了相同的错误。我还试着删除postinstall代码,但没有区别。

实际上,我所看到的代码和代码示例之间唯一的区别是url。(Sourceforge最近更改为https,但项目收到了临时的http回滚。)最多可下载3个文件&这三个文件都可以使用Inno 5与第三方下载程序插件一起下载。我无法获得使用相同的url的inno 6脚本的一个下载。

代码语言:javascript
复制
[Setup]
PrivilegesRequired=lowest

[Files]
Source: "{tmp}\version";  DestDir: "{userappdata}\wire"; Flags: external ignoreversion; Components: connect  
代码语言:javascript
复制
[Code]
var
DownloadPage: TDownloadWizardPage;

function OnDownloadProgress(const Url, FileName: String; const     Progress, ProgressMax: Int64): Boolean;
begin
  if Progress = ProgressMax then
Log(Format('Successfully downloaded file to {tmp}: %s', [FileName]));
  Result := True;
end;

procedure InitializeWizard;
begin
  DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress);
end;

function NextButtonClick(CurPageID: Integer): Boolean;
begin
  if CurPageID = wpReady then begin
    DownloadPage.Clear
    DownloadPage.Add('http://yyy.sourceforge.net/SecurityUpdates/version', 'version.txt', '');
    DownloadPage.Show;
    try
      try
        DownloadPage.Download; // This downloads the files to {tmp}
        Result := True;
      except
        SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
        Result := False;
      end;
    finally
      DownloadPage.Hide;
    end;
  end else
    Result := True;
end;

编辑url & filename

EN

回答 1

Stack Overflow用户

发布于 2022-10-16 07:17:54

要下载的文件的Url不正确。只需在浏览器中检查它,我就会得到错误404:

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74084318

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档