Update executable not getting swapped with newly downloaded .ts3 file.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nsti
    Indigo Rose Customer
    • Oct 2004
    • 40

    Update executable not getting swapped with newly downloaded .ts3 file.

    Running the current v3.00 release, noticed that on Windows 2008 R2, logged in as administrator, I found that the update executable is not being replaced by the new .ts3 file that has downloaded from the server. I did run one of the updaters (same script) from a compile that was done with an earlier version of True Update and it worked as expected on the same server. Cannot not honestly tell you which version but it was complied about 18 months ago.

    Now if I run the updater on a stand alone computer everything works as expected. Bit Defender tries to get in the way but with it turned off you see the script working exactly as is has for the past 5 years.

    So I am wondering if there was something that changed in True Update that might possibly be causing the issue. I event went so far as setting the Share to Everyone with Full control and no change.

    So you are aware, the update script does work and the software does update properly. In the end it just leaves the .ts3 file and the update executable at an old date.

    Any suggestions?

    Jack
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5137

    #2
    What does the update log file tell you?

    Ulrich

    Comment

    • nsti
      Indigo Rose Customer
      • Oct 2004
      • 40

      #3
      Here is a copy of the log file:

      [05/21/2014 06:30:46] Success Update started: E:\USER NAME\Auct-Tr\at70_update.ts3
      [05/21/2014 06:30:46] Notice Update engine version: 3.7.0.0
      [05/21/2014 06:30:46] Notice Product: Auction-Tracker v7.00
      [05/21/2014 06:30:46] Success Language set: Primary = 9, Secondary = 1
      [05/21/2014 06:30:46] Success Include script: _TU20_Global_Functions.lua
      [05/21/2014 06:30:46] Success Display screen: Download Server Script
      [05/21/2014 06:30:46] Success Language set: Primary = 9, Secondary = 1
      [05/21/2014 06:30:47] Success Display screen: Update Available
      [05/21/2014 06:30:54] Success Display screen: License Agreement
      [05/21/2014 06:31:01] Success Display screen: Download File (HTTP)
      [05/21/2014 06:31:26] Success Display screen: Update Successful
      [05/21/2014 06:31:33] Success Run client data event: Client Script
      [05/21/2014 06:31:33] Notice Exit update process (Return code: 0)

      This is one of the logs from one of the folders where the .ts3 file did not replace the .exe file. I do not see any error messages. (Sorry had to swap out the user's name with USER NAME for privacy reasons.)

      The script for the update process was actually created a number of years ago. However, when I run it on a Windows Vista, 7 or 8 computer it runs fine. It is just with 2008 R2 and recent patches. And with 2008 R2, I did login as administrator had absolute rights to the computer. Shutting off the security suite software on the server made no difference.

      So if you have anything you would like for me to look at or try? Please let me know.

      Thank you!

      Jack



      Originally posted by Ulrich View Post
      What does the update log file tell you?

      Ulrich

      Comment

      • Ulrich
        Indigo Rose Staff Member
        • Apr 2005
        • 5137

        #4
        This week I received another report, describing the same problem, mentioning initially that this was also happening on a Windows Server platform. After a lot of testing here, and with the results sent in by this customer, I am left to believe that there is some kind of timing issue occurring. Sometimes, apparently most frequently on server platforms, the old executable can take a little longer to exit, and when the new update client attempts to replace the file with the more recent version, the process fails because the file is locked, busy or something.

        All the testing results were forwarded to the developers, who may be able to insert some kind of delay and retry the operation a few milliseconds later if the first copy attempt fails. I don't know if they decide to implement this suggestion I made, and if they do, when this will happen.

        However, I created a short Lua code, which will attempt to update the client executable, in case the automatic replacement failed. Here is the code, which should be placed at the start of the Client Script:
        Code:
        [COLOR="#008000"]-----------------------[/COLOR]
        [COLOR="#008000"]-- Quick sanity test[/COLOR]
        [COLOR="#008000"]-----------------------[/COLOR]
        [COLOR="#0000FF"]local[/COLOR] sPath [COLOR="#FF0000"]=[/COLOR] String[COLOR="#FF0000"].[/COLOR]SplitPath(_SourceFilename)[COLOR="#FF0000"];[/COLOR]
        [COLOR="#0000FF"]if[/COLOR] (sPath[COLOR="#FF0000"].[/COLOR]Extension [COLOR="#FF0000"]==[/COLOR] [COLOR="#800080"]".ts3"[/COLOR]) [COLOR="#0000FF"]then[/COLOR]
          TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]TrueUpdate client about to be updated[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
          [COLOR="#008000"]-- update client was not yet renamed for some reason![/COLOR]
          File[COLOR="#FF0000"].[/COLOR]Copy(_SourceFilename[COLOR="#FF0000"],[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Drive [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Folder [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Filename [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]".exe"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]false[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]false[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]error[/COLOR] [COLOR="#FF0000"]=[/COLOR] Application[COLOR="#FF0000"].[/COLOR]GetLastError()[COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]if[/COLOR] ([COLOR="#0000FF"]error[/COLOR] [COLOR="#FF0000"]~=[/COLOR] [COLOR="#000000"]0[/COLOR]) [COLOR="#0000FF"]then[/COLOR]
            TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Error[COLOR="#800080"]\t[/COLOR]Could not replace the TrueUpdate client executable! Error "[/COLOR][COLOR="#FF0000"]..[/COLOR][COLOR="#0000FF"]error[/COLOR][COLOR="#FF0000"]..[/COLOR][COLOR="#800080"]": "[/COLOR] [COLOR="#FF0000"]..[/COLOR]_tblErrorMessages[COLOR="#FF0000"][[/COLOR][COLOR="#0000FF"]error[/COLOR][COLOR="#FF0000"]]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]else[/COLOR]
            TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]TrueUpdate client updated successfully[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]end[/COLOR]
        [COLOR="#0000FF"]else[/COLOR]
          TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]TrueUpdate client running as exe[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
          [COLOR="#0000FF"]if[/COLOR] File[COLOR="#FF0000"].[/COLOR]DoesExist(sPath[COLOR="#FF0000"].[/COLOR]Drive [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Folder [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Filename [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]".ts3"[/COLOR]) [COLOR="#0000FF"]then[/COLOR]
            File[COLOR="#FF0000"].[/COLOR]Delete(sPath[COLOR="#FF0000"].[/COLOR]Drive [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Folder [COLOR="#FF0000"]..[/COLOR] sPath[COLOR="#FF0000"].[/COLOR]Filename [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]".ts3"[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]error[/COLOR] [COLOR="#FF0000"]=[/COLOR] Application[COLOR="#FF0000"].[/COLOR]GetLastError()[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]if[/COLOR] ([COLOR="#0000FF"]error[/COLOR] [COLOR="#FF0000"]~=[/COLOR] [COLOR="#000000"]0[/COLOR]) [COLOR="#0000FF"]then[/COLOR]
              TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Error[COLOR="#800080"]\t[/COLOR]Could not delete downloaded client executable! Error "[/COLOR][COLOR="#FF0000"]..[/COLOR][COLOR="#0000FF"]error[/COLOR][COLOR="#FF0000"]..[/COLOR][COLOR="#800080"]": "[/COLOR] [COLOR="#FF0000"]..[/COLOR]_tblErrorMessages[COLOR="#FF0000"][[/COLOR][COLOR="#0000FF"]error[/COLOR][COLOR="#FF0000"]]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]else[/COLOR]    
              TrueUpdate[COLOR="#FF0000"].[/COLOR]WriteToLogFile([COLOR="#800080"]"Info[COLOR="#800080"]\t[/COLOR]Old *.ts3 file deleted[COLOR="#800080"]\r[/COLOR][COLOR="#800080"]\n[/COLOR]"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]true[/COLOR])[COLOR="#FF0000"];[/COLOR]
            [COLOR="#0000FF"]end[/COLOR]
          [COLOR="#0000FF"]end[/COLOR]
        [COLOR="#0000FF"]end[/COLOR]
        Please try this, and write if it helped, or not.

        Ulrich

        Comment

        Working...
        X