summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Klishin <michael@rabbitmq.com>2015-02-07 08:10:45 +0300
committerMichael Klishin <michael@rabbitmq.com>2015-02-07 08:10:45 +0300
commit45fff3fd7dbb6cbb14baa13989981cac7bbb621f (patch)
tree4c463ae9d71c771576e5112d3a4c6fc3a5cd9b43
parentd770554bb88385940011547da19a9cf1f7c6efa6 (diff)
downloadrabbitmq-server-git-45fff3fd7dbb6cbb14baa13989981cac7bbb621f.tar.gz
Make .msi installer install new version after uninstalling the existing one
With this change it becomes possible to embed RabbitMQ .msi installer into other installers. Contributed by Patrick Ribbing.
-rw-r--r--packaging/windows-exe/rabbitmq_nsi.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in
index a8499d3dd2..6921251117 100644
--- a/packaging/windows-exe/rabbitmq_nsi.in
+++ b/packaging/windows-exe/rabbitmq_nsi.in
@@ -186,14 +186,16 @@ Function .onInit
ReadRegStr $0 HKLM ${uninstall} "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." IDCANCEL norun
+ MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "RabbitMQ is already installed. $\n$\nClick 'OK' to remove the previous version or 'Cancel' to cancel this installation." IDOK rununinstall IDCANCEL norun
+ norun:
+ Abort
+
+ rununinstall:
;Run the uninstaller
ClearErrors
- ExecWait $INSTDIR\uninstall.exe
+ ExecWait "$INSTDIR\uninstall.exe /S"
- norun:
- Abort
${EndIf}
FunctionEnd