gpt4 book ai didi

installation - Inno setup-如果未安装其他程序,请跳过安装

转载 作者:行者123 更新时间:2023-12-04 05:12:38 27 4
gpt4 key购买 nike

如果没有安装其他程序,我必须找到如何跳过安装的方法。我可以检测到其他程序的注册表(基本脚本返回true / false),这不是问题。但是我不知道如何跳过安装。

简而言之:如果未设置注册表中的一个键,请在此之前打印消息“安装程序xyz”并完成安装程序。

最佳答案

这很容易。只需添加

[Code]

function IsApp2Installed: boolean;
begin
result := RegKeyExists(HKEY_LOCAL_MACHINE,
'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\app2.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,它在安装程序启动时(甚至在显示向导GUI之前)执行。如果返回 false,安装程序将立即退出。

关于installation - Inno setup-如果未安装其他程序,请跳过安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5908651/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com