Install Elasticsearch Service in Windows

Elasticsearch service can not install in windows, When I run blow command:

.\elasticsearch-service.bat install

This output displayed in the command prompt:

C:\Users\Kiarash\Desktop\elasticsearch\bin>.\elasticsearch-service.bat install
Installing service      :  "elasticsearch-service-x64"
Using JAVA_HOME (64-bit):  "C:\Program Files\Java\jdk1.8.0_121"
'findstr /b \- "C:\Users\Kiarash\Desktop\elasticsearch\config\jvm.options" | findstr /b /v "\-server \-client"' is not recognized as an internal or external command,
operable program or batch file.
The syntax of the command is incorrect.

What is problem?

What version of Windows is this?

Windows 10 Enterprise - x64

I think that findstr is not in your path. Please check your path and add C:\windows\system32 to your path if it's missing.

@jasontedor No, findstr is in my path. The problem is elsewhere.

What do you think the issue is then?

@jasontedor I tested findstr and that works fine, I do not know what the problem is.

Try the following: In the Elasticsearch-service properties (.\elasticsearch-service.bat manager), under the Java tab, untick "use Default". stop/start service.

@Leon_Nell When Elasticsearch Service can not be install How i can open Elasticsearch service manager?!!!

When i try open Elasticsearch service manager this message is displayed:

Do you run your console (cmd or powershell) as Administrator by any chance?

@Leon_Nell Yes

@jasontedor After updating Windows 10 to Creators Update, Problem Solved!

Okay, that's good to know!

1 Like

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