# CPack a Windows Service

**URL:** <https://discourse.cmake.org/t/cpack-a-windows-service/5251>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [March 19, 2022, 5:53pm UTC](https://discourse.cmake.org/t/cpack-a-windows-service/5251 "2022-03-19T17:53:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshanab](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jshanab/32/2555_2.png) [@jshanab](https://discourse.cmake.org/u/jshanab)\
**Post date:** [March 19, 2022, 5:53pm UTC](https://discourse.cmake.org/t/cpack-a-windows-service/5251/1 "2022-03-19T17:53:41Z")

</div>

I have been trying to figure out if there is an easy and proper way to install a Windows Service

In NSIS this would be a hidden (-{sectionname}) part that calls the service manager to stop and unregister(if necessary)-\>register new service location.

is there an add\_service\_component or argument for this?
