diff options
| -rw-r--r-- | packaging/windows-exe/rabbitmq_nsi.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in index 693f0cf436..d377713e95 100644 --- a/packaging/windows-exe/rabbitmq_nsi.in +++ b/packaging/windows-exe/rabbitmq_nsi.in @@ -110,6 +110,20 @@ SectionEnd ; Functions +Function .onInit + ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ" "UninstallString" + ${If} $0 != "" + MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "RabbitMQ is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this installation." IDOK uninst + + Abort + + ;Run the uninstaller + uninst: + ClearErrors + Exec $INSTDIR\uninstall.exe + ${EndIf} +FunctionEnd + Function findErlang StrCpy $0 0 |
