And*_*and 29
uses ShellAPI;
...
procedure TForm1.RestartThisApp;
begin
ShellExecute(Handle, nil, PChar(Application.ExeName), nil, nil, SW_SHOWNORMAL);
Application.Terminate; // or, if this is the main form, simply Close;
end;
Run Code Online (Sandbox Code Playgroud)