# Installing Elastic Agent MSI with INSTALLARGS option does not work

**URL:** <https://discuss.elastic.co/t/installing-elastic-agent-msi-with-installargs-option-does-not-work/365268>\
**Category:** Elastic Agent\
**Created:** [August 21, 2024, 10:07am UTC](https://discuss.elastic.co/t/installing-elastic-agent-msi-with-installargs-option-does-not-work/365268 "2024-08-21T10:07:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![loris\_lx](https://avatars.discourse-cdn.com/v4/letter/l/eb8c5e/32.png) [@loris\_lx](https://discuss.elastic.co/u/loris_lx)\
**Post date:** [August 21, 2024, 10:07am UTC](https://discuss.elastic.co/t/installing-elastic-agent-msi-with-installargs-option-does-not-work/365268/1 "2024-08-21T10:07:21Z")

</div>

Hello,  
I have a problem installing Elastic Agent with MSI package. When i specify `INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>` the installation ends with an error and the agent is not installed.

So i tried to run the installation without the INSTALLARGS option and it works but then i have to enroll the agent manually which is a problem because that was the purpose of the INSTALLARGS option…

Information :

- Stack Elastic : 8.15.0
- Package Elastic Agent MSI : 8.15.0

To reproduce:

- Download the Elastic Agent MSI package
- Run : `elastic-agent-8.15.0-windows-x86_64.msi INSTALLARGS="--url=<URL> --enrollment-token=<TOKEN>"` --\> ERROR
- If we run : `elastic-agent-<VERSION>-windows-x86_64.msi` --\> No error but the agent did not enroll

![EA-MSI_ErrorSetup](https://us1.discourse-cdn.com/elastic/original/3X/d/0/d011e54004b7b136d2167a5a9ef1122fc172f716.png)
