Advertisement
Guest User

Untitled

a guest
Oct 7th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Code]
  2. function InitializeSetup(): boolean;
  3. var
  4.   ResultCode: integer;
  5. begin
  6.   if Exec('java', '-version', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin
  7.     Result := true;    
  8.   end
  9.   else begin          
  10.     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
  11.       Result := false;
  12.       ShellExec('open', 'https://java.com/download/', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
  13.     end;  
  14.   end;
  15. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement