System Delphi

Title: How to run an application once a windows-session
procedure TForm1.FormShow(Sender: TObject);
var
atom: Integer;
begin
if GlobalFindAtom('a random string here') = 0 then
atom := GlobalAddAtom('a random string here')
else
begin
ShowMessage('This application will run once a windows-session' + #13 +
'Restart Your computer to use this app');
Close;
end;
end;