procedure TForm1.FormCreate(Sender: TObject);
begin
  Memo1.Lines.Clear;
end;procedure TForm1.Button1Click(Sender: TObject);
var
  Host:string;
begin
  Host:=Edit1.Text;
  tempfile:='c:\tempfile.txt';
  if fileexists(tempfile) then
     DeleteFile(tempfile);
  WinExec(pchar('command.com /C net time \\'+Host+'>'+tempfile),SW_HIDE);
  try
    if not FileExists(tempfile) then
      sleep(3000);
     Memo1.Lines.LoadFromFile(tempfile);
  except
  end;    end;procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  if FileExists(tempfile) then
    DeleteFile(tempfile);
end;