如何在Inno Setup安装脚本的[运行]部分中设置进度栏值? [英] How to set the progress bar value in the [Run] section of the Inno Setup install script?

查看:138
本文介绍了如何在Inno Setup安装脚本的[运行]部分中设置进度栏值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这类似于以下问题: 运行"部分的Inno Setup简单进度页面

This is similar to this question: Inno Setup Simple progress page for Run section

如果我要在我的 Inno Setup 脚本中添加一些MSI文件,则可以安装[Run]部分中的这些文件.那时进度条显示为100%,并在进度条上方显示StatusMsg.

If I'm adding some MSI files to my Inno Setup script, I can install these files from the [Run] section. At that time the progress bar shows 100% and shows the StatusMsg above the progress bar.

我想在[Run]部分中手动设置进度条的值,例如50%.

I want manually set the value of the progress bar in the [Run] section, say a value of 50%.

类似于以下内容:

[Run]
Filename: msiexec.exe; Parameters: "/i ""{#MyRtePath}\runtime.msi"" /qn /norestart"; \
    StatusMsg: Installing Runtime Engine; WizardForm.ProgressGauge.progress: 50 ;

推荐答案

对于每个[Run]条目,您都可以通过BeforeInstall和/或AfterInstall处理程序对其进行调用,从而使用与所链接的问题类似的代码. 请注意,Inno本身将在文件部分中运行高达100%,因此您的代码将需要再次从0%开始,或调整每个条目以使用自定义定位.

You can use similar code to the question you linked to, by calling it from the BeforeInstall and/or AfterInstall handler for each [Run] entry. Note that Inno itself will run up to 100% in the files section, so you're code will need to start from 0% again, or adjust EVERY entry to use the custom positioning.

这篇关于如何在Inno Setup安装脚本的[运行]部分中设置进度栏值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆