Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Based on the code snippet you linked to I think that you have no need to worry.</p> <p>The .onInit function is executed prior to the installer UI being drawn on the screen, hence the uninstaller is going to be run before the user even has a chance to interact with the installer.</p> <p>Just to make sure you are correctly understanding what that code is doing, when you run the new installer it is looking in the Registry to find the location of the Uninstaller executable of the old version, then popping a message box asking if you would like to uninstall the previous version. If you click ok then it will execute the uninstaller using the ExecWait instruction which will prevent the next instruction from being executed until the uninstaller returns (finishes). If the user clicks cancel it will then skip the uninstall of the old version.</p> <p>Because all of this is done in the .onInit function, the User has no chance to interact with the new version before the old version is uninstalled.</p> <p>The only way they could install the new version prior to uninstalling the old version is if they click on cancel when the messagebox comes up. If you would like to remove this option then you could change the MessageBox code too:</p> <pre><code>MessageBox MB_OK|MB_ICONEXCLAMATION \ "${PROGRAM_NAME} is already installed. $\n$\nClick `OK` to remove the \ previous version" </code></pre> <p>You also need to remove the <code>IDOK uninst</code> and <code>Abort</code> lines following the MessageBox instruction.</p> <p>Hope this helps.</p> <p>The Basic format of your script should be:</p> <pre><code>Function .onInit code you linked to goes here FunctionEnd Section "Install" install stuff goes here SectionEnd Section "Uninstall" Uninstall stuff goes here SectionEnd </code></pre>
    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. This table or related slice is empty.
    1. VO
      singulars
      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