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.