与此问题类似:
如何在Inno Setup安装脚本的[Run]部分设置进度条值?
当Inno Setup进入该[Run]部分时,进度条显示为100%并停在此位置.
我在本Run节中安装了许多文件,我希望重新启动进度条并控制它,因为它会安装每个程序.
状态消息很容易改变(StatusMsg),但我失去了一些进展.你能帮帮我吗?
例:
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""msxml.msi"" /quiet"; \
StatusMsg: "MSXML..."; Flags: runascurrentuser
Filename: "msiexec.exe"; Parameters: "/i ""capicom_dc_sdk.msi"" /quiet"; \
StatusMsg: "CAPICOM..."; Flags: runascurrentuser
Run Code Online (Sandbox Code Playgroud)
由于我想在安装过程中控制进度条,我不知道该怎么做.我想也许在使用BeforeInstall参数,创建一个代码,通过执行类似WizardForm.ProgressGauge.Position = 0;和在AfterInstall参数中相反的方式将进度条设置为0 WizardForm.ProgressGauge.Position = 100;,但是在安装过程中如何更改?
谢谢.
我想在安装新数据库之前删除旧数据库,以便为用户更新它.
我有以下场景:
在我的Components部分中,我有一个用户选项:
[Components]
Name: "updateDatabase"; Description: "Update Database"; Types: custom; \
Flags: checkablealone disablenouninstallwarning
Run Code Online (Sandbox Code Playgroud)
我在Code章节中有一个程序,如果用户选择此选项,则在运行部分中执行,然后再安装新程序.
[Code]
procedure RemoveOldDatabase();
begin
...
end;
[Run]
**--> Here I want to call RemoveOldDatabase if Components: updateDatabase is checked**
Filename: "database.exe"; StatusMsg: "Installing new database..."; Components: updateDatabase
Run Code Online (Sandbox Code Playgroud)
新数据库的安装工作正常.问题是我想在安装新的之前删除旧的,调用该过程RemoveOldDatabase.
是否可以只使用Inno Setup?
谢谢.