如果未安装其他程序,则跳过Inno Setup中的安装 [英] Skip installation in Inno Setup if other program is not installed
本文介绍了如果未安装其他程序,则跳过Inno Setup中的安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
简而言之:如果注册表中没有设置一项,则打印消息‘在此项之前安装程序xyz’并完成安装程序。
推荐答案
这非常简单。只需添加
[Code]
function IsApp2Installed: boolean;
begin
result := RegKeyExists(HKEY_LOCAL_MACHINE,
'SOFTWAREMicrosoftWindowsCurrentVersionApp Pathsapp2.exe');
end;
function InitializeSetup: boolean;
begin
result := IsApp2Installed;
if not result then
MsgBox('You need to install App2 before you install ThisApp. Install App2 and then run this installer again.', mbError, MB_OK);
end;
到您的ISS文件。InitializeSetup
是所谓的event function,它在安装程序启动时(甚至在显示向导图形用户界面之前)执行。如果返回false
,安装程序将立即退出。
这篇关于如果未安装其他程序,则跳过Inno Setup中的安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文