Elastic Agent MSI – Is INSTALLDIR supported for custom installation directory?

Hi all,

I am installing Elastic Agent 9.0.4 using the MSI package and I would like to place it in a custom directory.

According to the official elastic documentation, it seems possible to specify a custom installation directory with INSTALLDIR (available since version 8.13).

However, in this GitHub repository I also found a note stating that customizing the installation directory is not supported for Elastic Agent MSI (only for Beats).

When I try with:

msiexec /i Elastic-Agent-9.0.4.msi INSTALLDIR="D:\Elastic\Agent"

it still installs everything into the default path under C:\Program Files.

Could someone confirm whether INSTALLDIR is actually supported for Elastic Agent MSI, and if the docs need an update?

Thanks in advance!