Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic-Agent on Windows shows the wrong path for the binary that needs to be used to uninstall it. #5292

Open
belimawr opened this issue Aug 13, 2024 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@belimawr
Copy link
Contributor

  • Version: 8.15.0
  • Operating System: Windows

The Elastic-Agent binary

##Steps to Reproduce:

  1. Install Elastic-Agent on Windows
  2. Try to uninstall running the binary used for installation:
PS C:\elastic-agent-8.15.0-windows-x86_64> .\elastic-agent.exe uninstall
Error: can only be uninstalled by executing the installed Elastic Agent at: C:\elastic-agent-8.15.0-windows-x86_64\elastic-agent.exe
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.15/fleet-troubleshooting.html
PS C:\elastic-agent-8.15.0-windows-x86_64> pwd

Path
----
C:\elastic-agent-8.15.0-windows-x86_64


PS C:\elastic-agent-8.15.0-windows-x86_64>  C:\elastic-agent-8.15.0-windows-x86_64\elastic-agent.exe uninstall
Error: can only be uninstalled by executing the installed Elastic Agent at: C:\elastic-agent-8.15.0-windows-x86_64\elastic-agent.exe
For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.15/fleet-troubleshooting.html

To actually uninstall the Elastic-Agent the following command needs to be run:

'C:\Program Files\Elastic\Agent\elastic-agent.exe' uninstall
@belimawr belimawr added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Aug 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@cmacknz
Copy link
Member

cmacknz commented Aug 13, 2024

.\elastic-agent.exe uninstall

This is because you aren't interacting with the installed Elastic Agent, but rather your uninstalled local extracted archive that you used to install.

Windows doesn't have an elastic-agent command in the path, you always need to use $BASE_PATH/elastic-agent.exe to interact with it. When you do that the path should be correct.

@belimawr
Copy link
Contributor Author

I get that there isn't an elastic-agent in the path, that's not my point here. Which is misleading is the the following statement:

Error: can only be uninstalled by executing the installed Elastic Agent at: C:\elastic-agent-8.15.0-windows-x86_64\elastic-agent.exe

Which is not true, executing C:\elastic-agent-8.15.0-windows-x86_64\elastic-agent.exe won't uninstall anything, that's exactly the binary and command I run and it told me to run it again...

In my opinion either we state the full path that will actually work or we just say to use the installed binary.

@ycombinator ycombinator added the good first issue Good for newcomers label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

4 participants