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 | 3b7cbaeb6027215b1db1fc0f48754ae375ed8aff (patch) | |
| tree | bc69a872b3626f565b04848ac77e92f34a6962c7 /packaging/windows-exe | |
| parent | bfd62917ab78f93a2c5cf51b1bdc9b382bdd4638 (diff) | |
| download | rabbitmq-server-git-3b7cbaeb6027215b1db1fc0f48754ae375ed8aff.tar.gz | |
Fixes for Windows XP: set our own environment too, invoke batch files via cmd.exe.
Diffstat (limited to 'packaging/windows-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 e2e6586c3b..2951e8ff4a 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 |
