INNO 设置[代码]块,设置状态?

发布于 2024-10-07 09:16:49 字数 507 浏览 0 评论 0原文

我有一个安装程序,需要在安装其他任何东西之前安装一些 Visual C++ 可再发行组件。这是因为 ActiveX COM 对象在未先安装的情况下不会注册。

我有正确安装 Visual C++ 的代码,但程序在安装时似乎挂起了一分钟(对用户来说),因为他们不知道发生了什么。有没有办法告诉用户我在做什么而不弹出实际的消息框?就像如何在 [Run] 块中设置状态一样。

// This function will be called after the last "Next" button is pressed, but before any files get installed
procedure DoPreInstall();
var
    ErrorCode: Integer;
begin
    Exec(ExpandConstant('vcredist_x86_2008.exe'), '/q', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode)
  end;
end;

I have an installer that needs to install some visual c++ redistributables before anything else gets installed. This is because an ActiveX COM object wont register without it being installed first.

I have the code that properly installs the visual c++, but the program seems to hang for a minute (to the user) while it is installing since they have no clue what is happening. Is there any way to inform the user what i am doing without popping up an actual messagebox? Like how you can set the status in the [Run] block.

// This function will be called after the last "Next" button is pressed, but before any files get installed
procedure DoPreInstall();
var
    ErrorCode: Integer;
begin
    Exec(ExpandConstant('vcredist_x86_2008.exe'), '/q', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode)
  end;
end;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九厘米的零° 2024-10-14 09:16:49

我还没有尝试过,但我发现了这个:http://news.jrsoftware。 org/news/innosetup.code/msg21747.html

这可能有帮助。另一种是以非静默模式运行 vcredist。

I haven't tried it but I found this: http://news.jrsoftware.org/news/innosetup.code/msg21747.html.

It might help. Another is to run the vcredist in a non-silent mode.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文