# Some proplem about Elasticsearch service install on windows

**URL:** <https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149>\
**Category:** Elasticsearch\
**Created:** [August 20, 2018, 11:11am UTC](https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149 "2018-08-20T11:11:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RioChen](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@RioChen](https://discuss.elastic.co/u/RioChen)\
**Post date:** [August 20, 2018, 11:11am UTC](https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149/1 "2018-08-20T11:11:48Z")

</div>

When I tried to install the elasticsearch as a service, I meet this probloem,and I can't solve it,could anyone know how to do with this.``PS C:\WINDOWS\system32\> f:``PS F:\> cd .\Elasticsearch`  
`PS F:\Elasticsearch> cd bin`  
`PS F:\Elasticsearch\bin> .\elasticsearch-service.bat install`  
`Installing service : "elasticsearch-service-x64"`  
`Using JAVA_HOME (64-bit): "C:\Program Files\Java\jdk1.8.0_181"`  
`-Xms1g;-Xmx1g;-XX:+UseConcMarkSweepGC;-XX:CMSInitiatingOccupancyFraction=75;-``XX:+UseCMSInitiatingOccupancyOnly;-XX:+AlwaysPreTouch;-Xss1m;-Djava.awt.headless=true;-``Dfile.encoding=UTF-8;-Djna.nosys=true;-XX:-OmitStackTraceInFastThrow;-Dio.netty.noUnsafe=true;-``Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-``Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-``Djava.io.tmpdir=C:\Users\dell\AppData\Local\Temp\elasticsearch;-``XX:+HeapDumpOnOutOfMemoryError;-XX:HeapDumpPath=data;-XX:ErrorFile=logs/hs_err_pid%p.log;-``XX:+PrintGCDetails;-XX:+PrintGCDateStamps;-XX:+PrintTenuringDistribution;-``XX:+PrintGCApplicationStoppedTime;-Xloggc:logs/gc.log;-XX:+UseGCLogFileRotation;-``XX:NumberOfGCLogFiles=32;-XX:GCLogFileSize=64m`  
`Failed installing 'elasticsearch-service-x64' service`  
and I checked the log:  
`[2018-08-20 20:39:53] [info] [11900] Service elasticsearch-service-x64 name Elasticsearch 6.3.2 (elasticsearch-service-x64)`  
`[2018-08-20 20:40:36] [error] [11900] access denied。`  
`[2018-08-20 20:40:36] [error] [11900] Failed installing 'elasticsearch-service-x64' service`  
`[2018-08-20 20:40:36] [error] [11900] access denied。`  
`[2018-08-20 20:40:36] [error] [11900] Commons Daemon procrun failed with exit value: 8 (Failed to install service)`  
`[2018-08-20 20:40:36] [error] [11900] access denied。`

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [August 20, 2018, 12:34pm UTC](https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149/2 "2018-08-20T12:34:57Z")

</div>

Please don't post images of text as they are hardly readable and not searchable.

Instead paste the text and format it with `</>` icon, then check the preview window.

* * *

It looks like the command prompt from which you're trying to install the service does not have sufficient privileges to do so, based on the access denied error. Open a command prompt with "run as administrator" and try again.

---

<div class="post-metadata">

**Author:** ![RioChen](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@RioChen](https://discuss.elastic.co/u/RioChen)\
**Post date:** [August 20, 2018, 1:28pm UTC](https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149/3 "2018-08-20T13:28:15Z")

</div>

Thanks for your reply.I have deleted the images and post the text with the \</\> icon.I already use the "run as administrator" way to open the command prompt,but the result seems no difference.Besides,I can run the "elasticsearch.bat" file correctly,But when I want to install it as a service,there are some problems.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 17, 2018, 1:28pm UTC](https://discuss.elastic.co/t/some-proplem-about-elasticsearch-service-install-on-windows/145149/4 "2018-09-17T13:28:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
