# Logstash 7.5.0 as Windows service using SC commands on CMD

**URL:** <https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-cmd/224268>\
**Category:** Logstash\
**Created:** [March 19, 2020, 1:00pm UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-cmd/224268 "2020-03-19T13:00:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sagardhakate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagardhakate/32/62179_2.png) [@sagardhakate](https://discuss.elastic.co/u/sagardhakate)\
**Post date:** [March 19, 2020, 1:00pm UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-cmd/224268/1 "2020-03-19T13:00:58Z")

</div>

I am not able to run logstash 7.5.0 as windows service using SC commands on command prompt.

C:\>sc \VIMPABCD-22 create "Elasticsearch Logstash-7.5.0" binpath=C:\Users\sagar.dhakate\Software\ElasticStack\logstash-7.5.0\logstash-7.5.0\bin\logstash.bat start= auto  
[SC] CreateService SUCCESS

C:\>sc \VIMPABCD-22 config "Elasticsearch Logstash-7.5.0" depend= elasticsearch-service-x64  
[SC] ChangeServiceConfig SUCCESS

C:\>sc \VIMPABCD-22 config "Elasticsearch Logstash-7.5.0" DisplayName= "Elasticsearch Logstash-7.5.0"  
[SC] ChangeServiceConfig SUCCESS

How to execute the command "-f C:\Users\sagar.dhakate\Software\ElasticStack\logstash-7.5.0\logstash-7.5.0\bin\sample.conf" which is ingesting the data into elasticsearch?

Please help me here.  
Note- I don't want to use Task Scheduler or NSSM.

---

<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:** [April 16, 2020, 1:09pm UTC](https://discuss.elastic.co/t/logstash-7-5-0-as-windows-service-using-sc-commands-on-cmd/224268/2 "2020-04-16T13:09:30Z")

</div>

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