two dialogue form happens and some times trueupdateclient is locking

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DanielLee
    Indigo Rose Customer
    • Apr 2012
    • 6

    two dialogue form happens and some times trueupdateclient is locking

    Hello :

    I am new to trueupdate client, I adopt trueupdateclient to update my software to new version. each time I create new trueupdateclient project version I will remove my setupfactory trueupdateclient.exe and dat and re add those two files from new trueupdateclient output folder.

    Following problem are always happen:
    1. During update software version by trueupdateclient there are always two dialogue form happens. One form shows the update processis completed but actually it is not because another form shows the upgrade progress. If I did not close completed message form sometimes the uninstall stage of upgrade process will show trueupdateclient is locking. If I skip it and continue the process finally there is not any reboot request information happened.

    error screen is as attachment. I also attach the trurupdate project files and setupfatcory files.

    Regards,

    Daniel Lee 2012/05/16
    Attached Files
  • Ulrich
    Indigo Rose Staff Member
    • Apr 2005
    • 5130

    #2
    Sorry, I cannot read the messages in Chinese, but I think that the problem is caused by a flaw in the logic used in your update procedure.

    Your TrueUpdate client downloads a full installer to deploy the current version, and this installer removes the local version if found, before installing the newer files. Your error is how you handle the TrueUpdate client files, which are also included in the setup.

    If you want to uninstall the local version during the update, you won't be able to remove the TrueUpdate client files, because an update is currently in progress, and the program is running. This means that these files will be removed during the next reboot... which is clearly a problem, because you may end up with no updater on the hard drive after the reboot.

    What you may need to do here is change the way you handle the TrueUpdate files. First of all, it would be best if you didn't install them into %AppFolder%. By placing the TrueUpdate client files there, you need to run the updater always "as administrator", and silent update checks become impossible to perform. In my opinion, placing the TrueUpdate client under %ApplicationDataFolderCommon% is much more interesting. There you can perform silent update checks (no triggering of the UAC), update the TrueUpdate executable and data file as needed, and request admin rights only when required (when an update is available for your application).

    Secondly, you must handle the uninstallation of the TrueUpdate client files manually. In the Setup Factory project, make sure that these two files have the option "Never remove" enabled. This means that these files will remain untouched by the uninstaller, and that you need to add File.Delete() or Folder.DeleteTree() in your On Post Uninstall script.

    Click image for larger version

Name:	SNAP-2012-05-16-01.png
Views:	1
Size:	37.9 KB
ID:	283722

    Also, mark the TrueUpdate files as "Never overwrite existing file", so you won't even try to replace the local version of these files with what is contained in the installer:
    Click image for larger version

Name:	SNAP-2012-05-16-02.png
Views:	1
Size:	15.1 KB
ID:	283723
    Here is how you could make this work: When you start the uninstaller from your script (because a previous version was found), pass a custom command line argument to the uninstaller, like "/UPDATE" or something else. This is done in the On Pre Install script, where you already pass the "/S" argument. In the uninstaller's On Startup script, you will check if the expected command line argument was provided. If it was, this means that you should not attempt to remove the TrueUpdate client files or folder - set a global variable to control if the code deleting the files should be executed or not. If the variable is not set (default), that code would be executed and the TrueUpdate client files would be removed as usual.

    Ulrich
    Last edited by Ulrich; 05-16-2012, 09:41 AM.

    Comment

    Working...
    X