procedure PrintError(msg : String);
begin
   var m := 1;
   for var line in msg.Split(#10) do
      m := Max(m, line.Length);
   PrintLn(StringOfChar('*', m + 6));
   PrintLn('*  ' + StringOfChar(' ', m) + '  *');
   for var line in msg.Split(#10) do
      PrintLn('*  ' + line + '  *');
   PrintLn('*  ' + StringOfChar(' ', m) + '  *');
   PrintLn(StringOfChar('*', m + 6));
end;

if ApplicationInfo.GetEnvironmentVariable('isadmin') <> '1' then begin
   PrintError('Please run this script as administrator');
   exit;
end;

if not DirectoryExists('C:\Program Files\Firebird\Firebird_3_0') then begin
   PrintError('Please install Firebird 3.0.7 64bit, with password "shaka"');
   exit;
end;

PrintLn('Everything looks ready')

