ho usato queste procedure
ho praticamente cambiato il metodo per arrivare alla soluzione, dopo averle provate tutte, c'è l'ho fattacodice:function DownloadFile(SourceFile, DestFile: string): Boolean; begin try Result := UrlDownloadToFile(nil, PChar(SourceFile), PChar(DestFile), 0, nil) = 0; except Result := False; end; end; procedure TfrmDownloadAggiorn.scaricafile(NomeFile,Est:string); var SourceFile:string; DestFile:string; begin SourceFile := 'http://www.civites.it/download_riservata/civites/'; DestFile := 'c:\'; SourceFile:=SourceFile+NomeFile; DestFile:=DestFile+NomeFile+Est; if DownloadFile(SourceFile, DestFile) then begin if MessageDlg('Download completato. Installare adesso? Avvertenza: Se vuoi installare l''aggiornamento in un altro momento, lo puoi installare manualmente da C:\ ', mtConfirmation, [mbYes, mbNo],0) = mrYes then ShellExecute(Application.Handle, PChar('open'), PChar(DestFile), PChar(''), nil, SW_NORMAL) end else ShowMessage('Error while downloading ' + SourceFile) end;
Ciao

Rispondi quotando