如何在卸载期间从PascalScript代码更新InnoSetup Wizard GUI状态文本

mkv*_*kva 2 installation installer inno-setup

在安装过程中,可以使用以下代码(如何从PascalScript代码更新InnoSetup向导GUI状态文本)从PascalScript事件处理程序"CurStepChanged(ssPostInstall)" 内更新InnoSetup向导状态文本:

WizardForm.StatusLabel.Caption := 'status update';
Run Code Online (Sandbox Code Playgroud)

这不适用于卸载.从"CurUninstallStepChanged(usUninstall)"内部访问此属性失败,并显示以下错误:

"Runtime Error: Line 526: Exception: Internal Error: An attempt was made to access WizardForm before it has been created."
Run Code Online (Sandbox Code Playgroud)

知道如何在卸载期间更改InnoSetup向导状态文本吗?也许"usUninstall"太早了?但是标签已经存在并且在卸载程序的GUI中可见...

mkv*_*kva 7

我找到了解决方案:

UninstallProgressForm.StatusLabel.Caption := 'status update';
Run Code Online (Sandbox Code Playgroud)