var
MyStream:TMemoryStream;
begin
try
MyStream := TMemoryStream.Create;
IdHTTP1.Get( 'http://localhost/download/j2sim.exe ',MyStream );
MyStream.SaveToFile(ExtractFilePath (Application.ExeName) + 'j2sim.exe ');
finally
MyStream.Free;
Edit1.Text := IdHTTP1.Response.Server + ': ' + IdHTTP1.Response.ResponseText;
end;
end;