jre 1.6 inno中的检查和进度条

发布于 2024-09-01 03:14:41 字数 150 浏览 1 评论 0原文

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

最好的问候

苏门

I want to check whether hre 1.6 or higher is installed or not. If installed I want to progress my application. If not installed , I want to install jre-6u17-windows-i586-s.exe after successfully installing jre , my control not returns to inno again. Please send a inno script for that.

best regards

SOumen

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半世蒼涼 2024-09-08 03:14:41

对于 [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

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

For the [FILES] section:

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

For the [CODE] section:

[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;

And for the RUN section:

[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

Hopefully that will get you pointed in the right direction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文