# Elastic Agent was installed failure on Windows 10

**URL:** <https://discuss.elastic.co/t/elastic-agent-was-installed-failure-on-windows-10/343321>\
**Category:** Elastic Agent\
**Created:** [September 19, 2023, 7:01am UTC](https://discuss.elastic.co/t/elastic-agent-was-installed-failure-on-windows-10/343321 "2023-09-19T07:01:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yshulin](https://avatars.discourse-cdn.com/v4/letter/y/3be4f8/32.png) [@yshulin](https://discuss.elastic.co/u/yshulin)\
**Post date:** [September 19, 2023, 7:01am UTC](https://discuss.elastic.co/t/elastic-agent-was-installed-failure-on-windows-10/343321/1 "2023-09-19T07:01:12Z")

</div>

Elastic Agent was installed failure on Windows 10, and it show "Error: symlink" error message.  
Elastic Agent Version: 8.6.1

**Install command:**  
.\elastic-agent.exe install --url=[https://10.x.x.12:5042](https://10.x.x.12:5042/) --enrollment-token=dEQtUWw0b0JWQWluQ214eHY1OXk6cTh6M24wbnNTRVMyTmNCd0lweTlNZw== --insecure

**Error message:**  
Elastic Agent will be installed at C:\Program Files\Elastic\Agent and will run as a service. Do you want to continue? [Y/n]:y  
Error: symlink C:\Program Files\Elastic\Agent\data\elastic-agent-b8553c\elastic-agent.exe C:\Program Files\Elastic\Agent\elastic-agent.exe: Cannot create a file when that file already exists.  
For help, please see our troubleshooting guide at [Troubleshoot common problems | Fleet and Elastic Agent Guide [8.6] | Elastic](https://www.elastic.co/guide/en/fleet/8.6/fleet-troubleshooting.html)

See the below picture:

 ![agent_install_error](https://us1.discourse-cdn.com/elastic/original/3X/7/4/745238548ffc1bc4f2d1b496191efb0aa1c3e0d3.png)

---

<div class="post-metadata">

**Author:** ![Bradut\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bradut_b/32/119730_2.png) [@Bradut\_B](https://discuss.elastic.co/u/Bradut_B)\
**Post date:** [October 11, 2023, 3:42pm UTC](https://discuss.elastic.co/t/elastic-agent-was-installed-failure-on-windows-10/343321/2 "2023-10-11T15:42:36Z")

</div>

Hi, you need to remove the existing Elastic Agent installation. If the Elastic service is already present, remove it, if needed with the sc command, then remove the entire ElasticAgent install directory. I hope this helps

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 8, 2023, 3:43pm UTC](https://discuss.elastic.co/t/elastic-agent-was-installed-failure-on-windows-10/343321/3 "2023-11-08T15:43:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
