summaryrefslogtreecommitdiff
path: root/packaging/windows-exe
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:39:20 +0000
committerSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:39:20 +0000
commit56739d42889e21bdbebda573838a4902d366515c (patch)
tree200a5c7440697a2efa057fef1746e57cde7ccbd6 /packaging/windows-exe
parent980034c74b3c5030498419cbb42c1853a21d833e (diff)
downloadrabbitmq-server-git-56739d42889e21bdbebda573838a4902d366515c.tar.gz
Remove previous version of RabbitMQ first.
Diffstat (limited to 'packaging/windows-exe')
-rw-r--r--packaging/windows-exe/rabbitmq_nsi.in14
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