Looking at the JVM options that are set during service creation vs. when run from the command line, there are some differences.
Elasticsearch as a service
-Djava.io.tmpdir=;
Elasticsearch executable
-Djava.io.tmpdir=C:\Users\ADMINI~1.WIN\AppData\Local\Temp\2\elasticsearch;
-Delasticsearch;-Des.path.home=C:\ElasticStack\elasticsearch\7.2;
-Des.path.conf=C:\ElasticStack\elasticsearch\7.2\config;
-Des.distribution.flavor=default;
-Des.distribution.type=zip;
-Des.bundled_jd=true
So running as an executable, it sets the java tmpdir to my local user account. The documentation says the following regarding this:
- Remove service
- Set System variable
- Reboot system
- Install service
- All is right in the world again