Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Code]
- function InitializeSetup(): boolean;
- var
- ResultCode: integer;
- begin
- if Exec('java', '-version', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin
- Result := true;
- end
- else begin
- if MsgBox('This tool requires Java Runtime Environment to run. Please download and install the JRE and run this setup again. Do you want to download it now?', mbConfirmation, MB_YESNO) = idYes then begin
- Result := false;
- ShellExec('open', 'https://java.com/download/', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement