gpt4 book ai didi

inno-setup - jre 1.6 inno中的检查和进度条

转载 作者:行者123 更新时间:2023-12-02 00:51:33 24 4
gpt4 key购买 nike

我想检查是否安装了 hre 1.6 或更高版本。如果已安装,我想继续我的申请。如果没有安装,我想在成功安装jre后安装jre-6u17-windows-i586-s.exe,我的控制权不再返回到inno。请为此发送一个 inno 脚本。

最诚挚的问候

搜门

最佳答案

对于 [FILES] 部分:

[Files]
Source: "jre-6u17-windows-i586-s.exe"; DestDir: "{app}\JRE 1.6"; Flags: onlyifdoesntexist

对于 [CODE] 部分:

[Code]
Function JREInstallPrompt:Boolean;
begin
if ((msgBox ('Do you want to install JRE 1.6?',mbinformation,mb_YesNo)=idYes)) then
begin
msgBox ('JRE 1.6 will being installing now. Please do not restart the machine or log off until it is complete!',mbinformation,mb_OK);
Result:=True;
end
else Result:=False;
end;

Function JREVerifyInstall:Boolean;
begin
if ((RegValueExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\JavaSoft','InstallerVersion')) or (JREInstallPrompt=False)) then //Exists or do not install
Result:=False
else Result:=True;
end;

对于 RUN 部分:

[Run]
;SQL Server Express 2005 Installer
Filename: "{app}\JRE 1.6\jre-6u17-windows-i586-s.exe"; WorkingDir: {app}\JRE 1.6; StatusMsg: Installing Java Runtime Environment... Please Wait...;Check:JREVerifyInstall

希望这能为您指明正确的方向。

关于inno-setup - jre 1.6 inno中的检查和进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2802845/

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