# Windows service installation

**URL:** <https://discuss.elastic.co/t/windows-service-installation/49283>\
**Category:** Beats\
**Tags:** beats-development\
**Created:** [May 5, 2016, 11:09am UTC](https://discuss.elastic.co/t/windows-service-installation/49283 "2016-05-05T11:09:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonjefford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonjefford/32/9605_2.png) [@simonjefford](https://discuss.elastic.co/u/simonjefford)\
**Post date:** [May 5, 2016, 11:09am UTC](https://discuss.elastic.co/t/windows-service-installation/49283/1 "2016-05-05T11:09:27Z")

</div>

Would there be any interest in a patch to libbeats to allow beats to self install themselves as a Windows Service? My reasoning is two-fold:

1. Removes the need to ship a Powershell script along with the binary.

2. Installation is possible on older Windows machines without Powershell installed.

It might make this issue easier to resolve as well:

> <https://github.com/elastic/beats/issues/163>

The idea would be to allow, for example, `.\filebeat.exe install` and `.\filebeat.exe uninstall`.

I have the basics up and running here on my dev machine.

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [May 9, 2016, 7:16am UTC](https://discuss.elastic.co/t/windows-service-installation/49283/2 "2016-05-09T07:16:24Z")

</div>

I think there is some interest in this, but @andrewkroh is probably best to comment?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [May 9, 2016, 4:38pm UTC](https://discuss.elastic.co/t/windows-service-installation/49283/3 "2016-05-09T16:38:54Z")

</div>

I'm pretty sure that at some point I brought the idea of using a parameter to install the service. It must have been in conversation because I couldn't find it in any comments. But I think @tudor wanted to keep the installation process separate from the Beat. Maybe @tudor recalls or has some ideas here.

I was thinking something along the lines of:

- `.\filebeat.exe -winsvc=install`
- `.\filebeat.exe -winsvc=start`
- `.\filebeat.exe -winsvc=stop`
- `.\filebeat.exe -winsvc=uinstall`

---

<div class="post-metadata">

**Author:** ![maddin2016](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maddin2016/32/16599_2.png) [@maddin2016](https://discuss.elastic.co/u/maddin2016)\
**Post date:** [November 9, 2016, 3:26pm UTC](https://discuss.elastic.co/t/windows-service-installation/49283/4 "2016-11-09T15:26:25Z")

</div>

Hi @andrewkroh, i see that there is the need of having a installer for beats. [Here](https://github.com/elastic/beats/issues/163) also. I have locally add a feature on my machine to create msi packages for the `.exe` files which also install them as a service. It's based on [Wix](http://wixtoolset.org/). Are you interested in such a feature?

---

<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 5, 2017, 9:50pm UTC](https://discuss.elastic.co/t/windows-service-installation/49283/5 "2017-07-05T21:50:18Z")

</div>


