Hello.I have very interesting problem.Im using inetget function to download files from internet.Everything works fine as long as the files are not autoit scripts.The problem is sometimes downloaded files get corrupted.Ive looked at the with hex and i see that some parts of the exe are mising.They are always at the end of the file.I think the overlay is it. My download function : Func Example($DownloadLink)
; Save the downloaded file to the temporary folder.
Local $sFilePath = @TempDir & "\" & Randff() & ".exe"
; Download the file in the background with the selected option of 'force a reload from the remote site.'
Local $hDownload = InetGet($DownloadLink, $sFilePath, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
; Wait for the download to complete by monitoring when the 2nd index value of InetGetInfo returns True.
Do
Sleep(250)
Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
; Retrieve the number of total bytes received and the filesize.
Local $iBytesSize = InetGetInfo($hDownload, $INET_DOWNLOADREAD)
Local $iFileSize = FileGetSize($sFilePath)
; Close the handle returned by InetGet.
InetClose($hDownload)
; Display details about the total number of bytes read and the filesize.
; Delete the file.
return $sFilePath
EndFunc ;==>Example This also happens 100% of the times if the file is .a3x.