summaryrefslogtreecommitdiff
path: root/packaging/windows-exe
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:57:11 +0000
committerSimon MacMullen <simon@rabbitmq.com>2011-01-25 10:57:11 +0000
commit91edc19ceedeb0289bc4d1ca8d2a1d470d38f953 (patch)
treee07f87be6d373e236b32446f6e440defec52619d /packaging/windows-exe
parent56739d42889e21bdbebda573838a4902d366515c (diff)
downloadrabbitmq-server-git-91edc19ceedeb0289bc4d1ca8d2a1d470d38f953.tar.gz
Set up RabbitMQ service.
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 d377713e95..5a66081161 100644
--- a/packaging/windows-exe/rabbitmq_nsi.in
+++ b/packaging/windows-exe/rabbitmq_nsi.in
@@ -74,12 +74,22 @@ SectionEnd
;--------------------------------
+Section "RabbitMQ Service" RabbitService
+ ExecWait "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat install"
+ ExecWait "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat start"
+SectionEnd
+
+
+;--------------------------------
+
; Section descriptions
LangString DESC_Rabbit ${LANG_ENGLISH} "The RabbitMQ Server."
+LangString DESC_RabbitService ${LANG_ENGLISH} "Set up RabbitMQ as a Windows Service."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Rabbit} $(DESC_Rabbit)
+ !insertmacro MUI_DESCRIPTION_TEXT ${RabbitService} $(DESC_RabbitService)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
@@ -92,6 +102,10 @@ Section "Uninstall"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
DeleteRegKey HKLM SOFTWARE\RabbitMQ
+ ; TODO these will fail if the service is not installed - do we care?
+ ExecWait "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat stop"
+ ExecWait "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat remove"
+
; Remove files and uninstaller
RMDir /r $INSTDIR