当我需要的时候,我怎样才能防止显示飞溅屏幕呢?我应该添加一些ISSI代码来完成这个任务吗?
这是我的代码:
#define ISSI_Splash "C:\InnoSetupProject\Images\client.bmp"
#define ISSI_Splash_T 3
#define ISSI_Splash_X 500
#define ISSI_Splash_Y 220
[Code]
function ISSI_InitializeSetup : Boolean;
begin
Result := True;
if not RegValueExists(HKLM, 'SOFTWARE\MyApp\Client', 'LocaleID') then
if MsgBox('Client does not exist', mbCriticalError, MB_OK) = IDOK then
begin
Result := False;
{ How can I prevent showing the splash screen here? }
Exit;
end
end;
#define ISSI_InitializeSetup
#define ISSI_IncludePath "C:\ISSI"
#include ISSI_IncludePath+"\_issi.isi"发布于 2020-04-06 14:35:31
不要使用遗留的ISSI_InitializeSetup函数,而是使用Inno安装程序6 事件属性
[Code]
<event('InitializeSetup')>
function MyInitializeSetup: Boolean;
begin
Result := True;
if not RegValueExists(HKLM, 'SOFTWARE\MyApp\Client', 'LocaleID') then
if MsgBox('Client does not exist', mbCriticalError, MB_OK) = IDOK then
begin
Result := False;
end;
end;并删除以下内容:
#define ISSI_InitializeSetupMyInitializeSetup将在ISSI InitializeSetup之前调用。如果它返回False,则不会调用ISSI,因此不会显示任何启动屏幕。
查看事件属性的文档
InitializeSetup、BackButtonClick、NextButtonClick、InitializeUninstall。- All implementations must return True for the event function to be treated as returning True and **an implementation returning False stops the calls to the other implementations.**https://stackoverflow.com/questions/61061439
复制相似问题