ExecWait does not wait ??
Hi,
I am a complete beginner with NSIS.
1) Here's what I want to do :
Before the installer begins, I want a screen that lets the user know that there is a earlier version installed (if there is one).
The user has then the choice to either uninstall the previous version or quit the installation.
How do I do this ?
Here is what I have so far :
;-------------------------------------------------------
Function MYonGUIInit
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \
"UninstallString"
StrCmp $R0 "" done
ShowMessageBox:
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${PRODUCT} est déjà installé. $\n$\nCliquez `OK` pour désinstaller \
la version précédente ou `Cancel` pour annuler cette installation." \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
ExecWait '$R0' ;Do not copy the uninstaller to a temp file
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT}" \
"UninstallString"
StrCmp $R0 "" done
Goto ShowMessageBox
done:
FunctionEnd
;-----------------------------------------
The problem is that my message box always appears a second time because ExecWait does not wait for the uninstaller to finish.
Can you help ?
Thanks,
Tief