diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-01-27 14:18:57 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-01-27 14:18:57 +0000 |
commit | 810a38e17378fe485e7d25384f4508ecaca2e936 (patch) | |
tree | bc69a872b3626f565b04848ac77e92f34a6962c7 | |
parent | 050b1874f462db5989f0c9bfce3b52aa738c1b83 (diff) | |
download | rabbitmq-server-810a38e17378fe485e7d25384f4508ecaca2e936.tar.gz |
Fixes for Windows XP: set our own environment too, invoke batch files via cmd.exe.
-rw-r--r-- | packaging/windows-exe/rabbitmq_nsi.in | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/packaging/windows-exe/rabbitmq_nsi.in b/packaging/windows-exe/rabbitmq_nsi.in index e2e6586c..2951e8ff 100644 --- a/packaging/windows-exe/rabbitmq_nsi.in +++ b/packaging/windows-exe/rabbitmq_nsi.in @@ -101,8 +101,9 @@ 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" + ExpandEnvStrings $0 %COMSPEC% + ExecWait '"$0" /C "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" install' + ExecWait '"$0" /C "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" start' CopyFiles "$WINDIR\.erlang.cookie" "$PROFILE\.erlang.cookie" CopyFiles "$WINDIR\.erlang.cookie" "$APPDATA\.erlang.cookie" SectionEnd @@ -152,8 +153,9 @@ Section "Uninstall" 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" + ExpandEnvStrings $0 %COMSPEC% + ExecWait '"$0" /C "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" stop' + ExecWait '"$0" /C "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" remove' ; Remove from PATH ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin" @@ -218,6 +220,10 @@ Function findErlang ; See http://nsis.sourceforge.net/Setting_Environment_Variables WriteRegExpandStr ${env_hklm} ERLANG_HOME $0 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + ; On Windows XP changing the permanent environment does not change *our* + ; environment, so do that as well. + System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("ERLANG_HOME", "$0").r0' ${EndIf} FunctionEnd
\ No newline at end of file |