Sign in to follow this  
Followers 0
KnowledgeSponge

Ati Cat Updater

2 posts in this topic

#1 ·  Posted (edited)

I was bored so I decided to make this last night. It may have some bugs as I didn't test throroughly. Also, I have 3mb cable and used the big dl all in one. Thought someone might like it or improve it. *Should* Check for new cat version every 2 hours (change it if you want). If it detects new version, offer to dl it. Once dled, offer to uninstall your current cats, then shutdown, restart and install the new cats. All functions should work for 4.8 cats at least, have to wait and see if it works for next update *shrug*. You need to set it to run on start up if you want all functions to work properly.

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RUN", "ATi Update", "REG_SZ", @ScriptDir & "\ATiUpdate.exe")
$BREAKOUT = 0
$parseexists = 0
$mycurrent = RegRead("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "CURRENT")
$shouldinstallorno = RegRead("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "UNINSTALLED")
If $shouldinstallorno = 1 Then
   RegWrite("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "UNINSTALLED", "REG_SZ", "0")
   Run("ATI xp-2k CATS Version " & $MYCURRENT & ".exe", @ScriptDir)
EndIf
While 1
   If $BREAKOUT = 1 Then
      FileClose(@ScriptDir & "\ATiUpdate.txt")
      Sleep(7200000)
      $BREAKOUT = 0
   EndIf
   Do
   FileDelete(@ScriptDir & "\ATiUpdate.txt") 
   URLDownloadToFile("http://www.ati.com/support/drivers/winxp/radeonwdm-xp.html?type=xp&prodType=graphic&prod=productsXPdriver&submit.x=9&submit.y=3?fakeParam=" & @HOUR & @MIN & @SEC, @ScriptDir & "\ATiUpdate.txt")
   If FileExists(@ScriptDir & "\ATiUpdate.txt") Then
      $parseexists = 1
   Else
      Sleep(30000)
   EndIf
   Until $parseexists = 1
   $OPENIT = FileOpen(@ScriptDir & "\ATiUpdate.txt", 0)
   Do
      $NEW = RegRead("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "CURRENT")
      If @error = 1 Then
         $ENTRY = InputBox("Version", "Please enter your current catalyst version.", "e.g 4.8")
         RegWrite("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "CURRENT", "REG_SZ", $ENTRY)
      EndIf
      $LINENUMBER = $LINENUMBER + 1
      $PARSE = FileReadLine($OPENIT, $LINENUMBER)
      If @error = -1 Then
         $BREAKOUT = 1
      EndIf
      $CHECKCURRENT = StringInStr($PARSE, "CATALYST Windows XP") 
      If $CHECKCURRENT <> 0 Then
         $GETPOS = StringSplit($PARSE, ".")
         $CHARSINLINEL = StringLen($GETPOS[1])
         $CHARSINLINER = StringLen($GETPOS[2])
         $CLEARITL = $CHARSINLINEL - 1
         $CLEARITR = $CHARSINLINER - 2
         $LEFT = StringTrimLeft($GETPOS[1], $CLEARITL)
         $RIGHT = StringTrimRight($GETPOS[2], $CLEARITR)
         If Not StringIsDigit($RIGHT) Then
            $RIGHT = StringTrimRight($GETPOS[2], ($CLEARITR + 1))
         EndIf
         $NEWESTVERSION = $LEFT & "." & $RIGHT
         If $NEWESTVERSION <> $NEW Then
            $DOWNLOAD = MsgBox(4, "Update Available", "ATI Catalyst Version " & $NEWESTVERSION & " available.  Download now?")
            $LINENUMBER = 0
            If $DOWNLOAD <> 6 Then
               $BREAKOUT = 1
            Else
               Do
                  $LINENUMBER = $LINENUMBER + 1
                  $PARSE = FileReadLine($OPENIT, $LINENUMBER)
                  $CHECKCURRENT = StringInStr($PARSE, "exe")
                  If $CHECKCURRENT <> 0 Then
                     $GETPOSDL = StringSplit($PARSE, '"')
                     URLDownloadToFile($GETPOSDL[2] & "?fakeParam=" & @HOUR & @MIN & @SEC, "ATI xp-2k CATS Version " & $NEWESTVERSION & ".exe")
                     RegWrite("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "CURRENT", "REG_SZ", $NEWESTVERSION)
                     SoundPlay(@ScriptDir & "\completed.mp3")
                     $OPENIT = MsgBox(4, "Download Complete!", "Proceed with Uninstall/Install Process?")
                     If $OPENIT <> 6 Then
                        $BREAKOUT = 1
                     Else
                        RegWrite("HKEY_CURRENT_USER\SOFTWARE\ATI UPDATE\", "UNINSTALLED", "REG_SZ", "1")
                        Run("rundll32 C:\WINDOWS\System32\atiiiexx.dll,_InfEngUnInstallINFFile_RunDLL@16 -force_restart -flags:0x2010001 -inf_class:DISPLAY -clean")
                        $BREAKOUT = 1
                     EndIf
                  EndIf
               Until $BREAKOUT = 1
            EndIf
         EndIf
      EndIf
   Until $BREAKOUT = 1
Wend
Edited by KnowledgeSponge

Share this post


Link to post
Share on other sites



Since the new CATALYST drivers were released and I saw that this worked without a hitch, I figured I would bump it with the updated code that I hadn't posted. I made icons etc if anyone is interested.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0