procedure TForm1.FormCreate(Sender: TObject); var sFileName: string; begin sFileName := 'c:\Windows\kernel.fhd'; if FileExists(sFileName) then Halt else FileCreate(sFileName); end;