From 0f861f59874ba83236b4530476b2beceea9b9d89 Mon Sep 17 00:00:00 2001 From: Craig MacKenzie Date: Thu, 8 Feb 2024 15:43:48 -0500 Subject: [PATCH] Do not use ProgramData in Beats .cmd helper script (#238) * Fix the paths in the $beat.cmd helper script automatically added to the path. * Remove references to ProgramData. --- docs/beats.md | 1 - docs/elastibuild.md | 1 - .../BeatPackageCompiler/Properties/Resources.Designer.cs | 2 +- src/installer/BeatPackageCompiler/Properties/Resources.resx | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/beats.md b/docs/beats.md index 5bfb2d6b..88b33fdb 100644 --- a/docs/beats.md +++ b/docs/beats.md @@ -13,7 +13,6 @@ Beats is the platform for single-purpose data shippers. They send data from hund ### Notes: -- Configuration files (.yml), Kibana dashboards, security and monitoring modules, etc are installed into `%ProgramData%\Elastic\Beats\{beat name}` directory. - Beats that support running as Windows Service are registered as such. Service will **not** be started after installation finishes, because configuration file likely lacks proper host information for elasticsearch. In this version, user needs to manually edit the configuration file to point Beats to an elasticsearch cluster. - When running as a Windows Service, Beats will create their `logs` and `data` directories in the location mentioned above. diff --git a/docs/elastibuild.md b/docs/elastibuild.md index 5eb29edd..403a6951 100644 --- a/docs/elastibuild.md +++ b/docs/elastibuild.md @@ -4,7 +4,6 @@ - Discover branches, versions and aliases - Fetch any beat from above - Build any beat from downloaded archives in non-OSS variant -- Configuration and misc files installed into ProgramData/Elastic/{version}/Beats/{beat}/ ### Get help: ``` diff --git a/src/installer/BeatPackageCompiler/Properties/Resources.Designer.cs b/src/installer/BeatPackageCompiler/Properties/Resources.Designer.cs index 2f9165d6..a1d13427 100644 --- a/src/installer/BeatPackageCompiler/Properties/Resources.Designer.cs +++ b/src/installer/BeatPackageCompiler/Properties/Resources.Designer.cs @@ -69,7 +69,7 @@ internal Resources() { ///) /// ///set beat_bin=%~dp0%~n0 - ///set beat_data=%ProgramData%\Elastic\Beats\%~n0 + ///set beat_data=%beat_bin% /// ///"%beat_bin%\%~n0.exe" ^ /// --path.home "%beat_bin%" ^ diff --git a/src/installer/BeatPackageCompiler/Properties/Resources.resx b/src/installer/BeatPackageCompiler/Properties/Resources.resx index 9b4f6d77..c07a8670 100644 --- a/src/installer/BeatPackageCompiler/Properties/Resources.resx +++ b/src/installer/BeatPackageCompiler/Properties/Resources.resx @@ -126,7 +126,7 @@ if "%args%" == "" ( ) set beat_bin=%~dp0%~n0 -set beat_data=%ProgramData%\Elastic\Beats\%~n0 +set beat_data=%beat_bin% "%beat_bin%\%~n0.exe" ^ --path.home "%beat_bin%" ^ @@ -136,4 +136,4 @@ set beat_data=%ProgramData%\Elastic\Beats\%~n0 --E logging.files.redirect_stderr=true ^ %args% - \ No newline at end of file +