From 92224e9c0a53554acc3364c19dd71c3774c1b321 Mon Sep 17 00:00:00 2001 From: Francesco Gualazzi Date: Tue, 7 Jan 2025 19:18:41 +0100 Subject: [PATCH] Win: install APM Server in Program Files directory (#14905) * Win: install APM Server in Program Files dir * update service name Also fixes #15082 --------- Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com> (cherry picked from commit 0681721f6215a33e7638490f24f4adc7973ae419) --- packaging/files/windows/install-service.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/files/windows/install-service.ps1 b/packaging/files/windows/install-service.ps1 index 324127bda8d..e6956d92f70 100644 --- a/packaging/files/windows/install-service.ps1 +++ b/packaging/files/windows/install-service.ps1 @@ -10,8 +10,8 @@ $workdir = Split-Path $MyInvocation.MyCommand.Path # Create the new service. New-Service -name apm-server ` - -displayName {{.BeatName | title}} ` - -binaryPathName "`"$workdir\apm-server.exe`" --environment=windows_service -c `"$workdir\apm-server.yml`" --path.home `"$workdir`" --path.data `"$env:PROGRAMDATA\apm-server`" --path.logs `"$env:PROGRAMDATA\apm-server\logs`" -E logging.files.redirect_stderr=true" + -displayName apm-server` + -binaryPathName "`"$workdir\apm-server.exe`" --environment=windows_service -c `"$workdir\apm-server.yml`" --path.home `"$workdir`" --path.data `"$env:PROGRAMFILES\apm-server`" --path.logs `"$env:PROGRAMFILES\apm-server\logs`" -E logging.files.redirect_stderr=true" # Attempt to set the service to delayed start using sc config. Try {