1. Jonathan Meltzer
  2. PowerBuilder
  3. Monday, 26 November 2018 16:03 PM UTC

When a user logs into my application, the application checks the database to see if it is the most up-to-date version.  Currently, when the app finds that it is NOT the most recent version, it gives the user a message to download the latest, and then exits.

What I would like is for the application to do the download of the latest code for the user (after a confirmation, or maybe even without asking).  The challenge is that the application cannot be active at the time the download occurs, or the PBDs and EXE will not be overwritten with the new code.  So, I envision something where the application calls out to another process which does the install, and then closes itself so that the current code can be replaced.

Is that the right way to handle this workflow?  Or is there something easier to implement to do what I am looking for?

Thanks,

Jonathan

Accepted Answer
Jonathan Meltzer Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 16:36 PM UTC
  2. PowerBuilder
  3. # Permalink

Thank you for that!  One thing I am not sure of:  How would the production app call the updater after closing, and how would the updater call the production app after closing?  What is the syntax to call out to an application that will run after the current app has exited?

Comment
  1. Juan Alejandro Lam López
  2. Monday, 26 November 2018 16:59 PM UTC
Validate if the production app is going to update

if so in the close event of the application



Run ("C: \ APP \ updater \ updater.exe")
  1. Helpful
  1. Jonathan Meltzer
  2. Monday, 26 November 2018 22:02 PM UTC
This is what I was looking for. Now I just have to write the updater :)
  1. Helpful
There are no comments made yet.
Juan Alejandro Lam López Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 16:30 PM UTC
  2. PowerBuilder
  3. # 1

You must bear in mind that the updating application is different than the production application, in separate folders, what you must do is the following:


The Production application (C:\APP\production\production.exe) checks if there is an update of your production application. If it exists, it closes and when it finishes, the updater is executed (C:\APP\updater\updater.exe), as the production application is closed, the updater can replace the files and upon completion of the update, the updater closes and executes the production application with the latest version.

 

 

Regards 

 

Juan Alejandro Lam

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 16:55 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jonathan;

   FYI: That is what PowerServer's IWA (Installable Web App) feature provides to your apps automatically ...

https://www.youtube.com/watch?v=3FWMr4z2Zgk

Regards ... Chris

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 21:16 PM UTC
  2. PowerBuilder
  3. # 3

Take a look at PBUpdater on this page:

http://www.topwizprogramming.com/tools.html

 

Comment
  1. Jonathan Meltzer
  2. Monday, 26 November 2018 22:01 PM UTC
Interesting! How would I bundle this into a user experience for my users, though? Would they all have to install the updater and configure it to use my application?
  1. Helpful
  1. Roland Smith
  2. Tuesday, 27 November 2018 20:39 PM UTC
The update code is incorporated into the app itself. The Admin program is used by the developer deploying the app. It creates a zip file for each file and uploads it to the website using FTP.

The PBUpdater code is used by my PBSearch tool. I have users in various countries around the world. I just upload the new version with the Admin app and the next time someone runs PBSearch, it asks them for permission to update. The zip files are downloaded via HTTP and the files are extracted to a temp folder. It also creates a vbscript file with filecopy commands. When PBSearch exits, it runs the vbscript file.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.