Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin

{execute the game}
WinExec('%WINDIR%\Temp\game.exe', SW_SHOW);

{end the application}
Application.Terminate;
end;

end.
I am trying to create a program (launcher) which opens an executable (game.exe) when it runs. Problem is that the game is located in the Windows Temp directory. Is there a way to execute it from there? Also how can I execute programs and wait for them to finish?