Archive: Function .onInit


Function .onInit
Hi

Should a user have an older version of our application installed on their machine then I wish our installer to uninstall the older version, then go on to install the newer version.

I am using the the following function:


Function .onInit
...
; First I determine if an older application exist.
...
; If it does then do the following:
MessageBox MB_OK "Display some uninstall message"
ExecWait '"${UNINSTALLER}"'
FunctionEnd


The problem I have is that the installer window and the uninstaller window both appear at the same time, albeit the installer window is directly behind the uninstaller window.

Even though I'm using ExecWait on the uninstaller it's obviously not waiting.

Ideally I only want to see the install window appear after the uninstall has finished.

Does anyone have any ideas?

Regards

Paul

The FAQ has your answer:

http://nsis.sourceforge.net/When_I_u...he_uninstaller


Thank you.