Trying to install ES to a Windows 2012 R2 server from a zip file following https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-windows.html.
Have set the logs and data folder to a separate location and added an environment variable for SERVICE_LOG_DIR and set ES_START_TYPE to auto (confirmed using .\bin\elasticsearch-service.bat manager).
If I restart the server the service fails to start, BUT I can start it manually, however it immediately stops again.
The Windows event logs show an error on starting but the only information is:
The Elasticsearch 6.1.0 (elasticsearch-service-x64) service terminated with the following service-specific error: Incorrect function.
I have had a similar error if I install ES using the msi as well. Is there a problem with the Service starting automatically in ES 6.1.0?