Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I do this, and it works well for me:</p> <p>After OK, this is done in UpdateOKClick:</p> <ol> <li>Display a progress bar and use InternetReadFile to read the new version install executable and write it to a temporary file (use GetTempPath in the System unit).</li> <li>Display a message box stating "Download complete. Closing program to install new version."</li> <li>Call ShellExecute to run the new version install executable from the temporary file location. The trick is that I call the install program (I'm using <a href="http://www.jrsoftware.org/isinfo.php" rel="nofollow">Inno Setup</a>) with two special parameters: /silent and /noicons. </li> <li>Run Application.Terminate to close the program.</li> </ol> <p>The program terminates immediately, and the install has a bit of a delay to it, so it starts after the program is already closed. The user will see the install progress screen that Inno Setup displays, but because of the two parameters, it will not ask any questions. </p> <p>The final step of the Inno Setup install is to launch the program. It does so calling it with a /webupdate parameter. </p> <p>When the program is launched, it checks if the webupdate parameter was used. If so, it does any initialization necessary for the new version, and then displays a message box stating "Program is now updated to Version xxx".</p> <p>There are a lot of checks and possible messages to issue along the way, including giving the user the option to cancel at any time, but that is basically it.</p> <p>... and I don't have to delete the previous executable. It just gets overwritten. That will fail if the user has a second instance of the program open, but that's another thing to check for.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload