Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if not Windows.CreateProcess(nil, PChar('"' + ThisEXEName + '" ' + Arguments), nil, nil,
True, DETACHED_PROCESS or CREATE_SUSPENDED, nil, StartupDirPointer, ThisStartupInfo, ThisProcessInformation) then
begin
raise Exception.Create('Unable to run ' + EXEName + ': ' + IntToStr(Windows.GetLastError));
end;
ThisProcessHandle := ThisProcessInformation.hProcess;
try
ResumeThread(ThisProcessInformation.hThread);
if TimeOutSeconds > 0 then
ThisTimeOut := Now + (TimeOutSeconds / (24 * 60 * 60))
else
ThisTimeOut := 0; // quiet the compiler warning
repeat
Application.ProcessMessages;
Sleep(500);
Windows.GetExitCodeProcess(ThisProcessHandle, ThisCode);
until (ThisCode <> STILL_ACTIVE) or ((TimeOutSeconds > 0) and (ThisTimeout < Now));
if ThisCode = STILL_ACTIVE then
raise ERunTimeOutError.Create('Timed-out waiting for ' + EXEName + ' to finish', ThisProcessHandle);
finally
Windows.CloseHandle(ThisProcessHandle);
end;