I tried uninstall now with the command line as the link you indicated, the log output:
MSI (s) (C0:9C) [10:20:09:420]: Product: Elasticsearch 7.2.0 -- Installation failed.
MSI (s) (C0:9C) [10:20:09:420]: Windows Installer installed the product. Product Name: Elasticsearch 7.2.0. Product Version: 7.2.0. Product Language: 1033. Manufacturer: Elastic. Installation success or error status: 1605.
This action is only valid for products that are currently installed.
C:\Users\gusta\Downloads\elasticsearch-7.2.0.msi
OK, so there's an ES_HOME environment variable specified, but it's not a system environment variable, so it's either a user environment variable or a process environment variable. Both of these can be removed with the following PowerShell
foreach ($scope in @("User", "Process")) {
[System.Environment]::SetEnvironmentVariable("ES_HOME", "", $scope)
}
Note that these changes won't be reflected in the current terminal until environment variables are refreshed from the registry. The easier way to check is to open a new terminal and check that ES_HOME environment variable no longer exists with
$env:ES_HOME
which should now not print anything. You can now try the install again. You may optionally also want to remove the data, config and logs directories from the previous installation, if you want to start completely clean. The default location for these is %ProgramData%\Elastic\Elasticsearch if using cmd, or $env:ProgramData\Elastic\Elasticsearch if using PowerShell.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.