InetGet ( '', & '\ccsetup-slim.exe', 1, 1 )Īn SRE would be able to get the version number from this page: Sorry i just cant get it working except for your original version Edited Augby Chimaera #include Global $sURL = "" $_Version = _StringBetween ( BinaryToString ( InetRead ( $sURL ) ), 'avg_free_x86_all_2011_', '.exe' ) If Not Then $_DownloadLink = '' & $_Version & '.exe' ConsoleWrite ( "->- $_DownloadLink : " & $_DownloadLink & ) EndIf ccsetup309_slim.exeAnother example i tried They are not for distribution or mirroring. So any suggestions i should look at or udf's that might be relevant?īuilds below are for system admins and advanced users. One other option i have would be to include another file update program with the script like Ketarin with the list of programs within and run from CMD line silent, but this to me adds complexity to the job. The question really is, is there a simple ish way to do this which gets the right link? bear in mind ive not done Internet stuff before. Which basically contains the Location link from above InetGet ( IniRead ( & "\file_includes\tools_links.ini", "AVG_Free", "Link", "NotFound" ), & "\file_includes\install_avg_free.exe", 1 ) Im calling the links at the min from an ini file like this Set-Cookie: avg_tracking_redirect=download-file-dm-afh path=/But unfortunatly they keep changing the links again as they are trying to protect them which is an ass, and on some like Ccleaner slim build i cant get them at all Set-Cookie: cmc=222 expires=Wed, 1 09:47:48 GMT path=/ domain=avg.com Expand collapse popup ConsoleWrite ( _HTTPGetResponse ( '' ) & ) Func _HTTPGetResponse ( $sUrl ) Local $Error, $Socket, $Recv = '' Local $Host = StringRegExpReplace ( $sUrl, '.*://(.*?)/.*', '\1' ) Local $Page = StringRegExpReplace ( $sUrl, '.*://.*?(/.*)', '\1' ) Local $Send = 'HEAD ' & $Page & ' HTTP/1.1' & & _ 'Host: ' & $Host & & _ 'User-Agent: AutoIt/' & & ' (Windows U Windows NT 5.1 en-US rv:1.8.1)' & & _ 'Referer: ' & $Host & & _ 'Connection: close' & & TCPStartup ( ) If Then Return SetError (, 0, '' ) EndIf $IP = TCPNameToIP ( $Host ) If Then Return SetError (, TCPShutdown ( ), '' ) EndIf $Socket = TCPConnect ( $IP, 80 ) If Then Return SetError (, TCPShutdown ( ), '' ) EndIf If Not TCPSend ( $Socket, $Send ) Then Return SetError (, TCPCloseSocket ( $Socket ) + TCPShutdown ( ), '' ) EndIf Do $Recv &= TCPRecv ( $Socket, 16 ) Until If Not $Recv Then $Error = Else $Error = 0 EndIf TCPCloseSocket ( $Socket ) TCPShutdown ( ) Return SetError ( $Error, 2, $Recv ) EndFunc =>_HTTPGetResponse
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |