# While installing Elastic search on Windows 7 , i am getting an error where in the "service install" cmd is not recognized in command prompt

**URL:** <https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657>\
**Category:** Elasticsearch\
**Created:** [June 8, 2017, 5:48am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657 "2017-06-08T05:48:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gourav\_Kumar](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gourav\_Kumar](https://discuss.elastic.co/u/Gourav_Kumar)\
**Post date:** [June 8, 2017, 5:48am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/1 "2017-06-08T05:48:33Z")

</div>

While installing Elastic search on Windows 7 , i am getting an error where in the "service install" cmd is not recognized in command prompt.

I have installed JDK , and have created the environment variable as well .

JAVA\_HOME : C:\Program Files (x86)\Java\jre1.8.0\_131\

Please help me!

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 9, 2017, 10:53am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/2 "2017-06-09T10:53:05Z")

</div>

I am guessing you get an error like : 'service' is not recognised as an internal or external command, operable program or batch file  
The error means there is no "service" command, on windows the command might be after is called "sc"

Can you use elasticsearch-service.bat to install the service? This is documented here : [https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/windows.html)  
Can you also make sure the command line is run as administrator in case you get a permission error?

Hope this helps  
Julien

---

<div class="post-metadata">

**Author:** ![Gourav\_Kumar](https://avatars.discourse-cdn.com/v4/letter/g/c68b51/32.png) [@Gourav\_Kumar](https://discuss.elastic.co/u/Gourav_Kumar)\
**Post date:** [June 9, 2017, 11:03am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/3 "2017-06-09T11:03:49Z")

</div>

@Julien

Thank you Julien, i am able to run the command as you pointed out correctly. However when i run this command. I see a message which say service is installed, but i am not able to start the service.

Can you please comment on this?

Regards,  
Gourav

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [June 14, 2017, 11:14am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/4 "2017-06-14T11:14:13Z")

</div>

Hi Gourav,  
If you can't start the service, please check the elasticsearch logs and find out which Error(s) appear. If you can't find documentation on the error raise it and we should be able to help direct you to the right resources  
In case you have no log file error, and an error from windows when starting the service, check that the service may be running by connecting to [http://localhost:9200](http://localhost:9200) - if you can connect elasticsearch is running

---

<div class="post-metadata">

**Author:** ![Leandro\_Sampaio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandro_sampaio/32/18409_2.png) [@Leandro\_Sampaio](https://discuss.elastic.co/u/Leandro_Sampaio)\
**Post date:** [June 14, 2017, 11:36am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/5 "2017-06-14T11:36:34Z")

</div>

Could you try a manual form to install the service...

---

<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:** [July 12, 2017, 11:36am UTC](https://discuss.elastic.co/t/while-installing-elastic-search-on-windows-7-i-am-getting-an-error-where-in-the-service-install-cmd-is-not-recognized-in-command-prompt/88657/6 "2017-07-12T11:36:42Z")

</div>

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