Quick Windows Service 2
CLI tool that installs/uninstalls your NodeJS app as a windows service. qckwinsvc2 is a Wrapper around node-windows.
This is a new version based on qckwinsvc which is not maintained anymore. This new CLI supports additional features such as argument passing.
Special thanks to tallesl
Made with ♡ by Suyeon® feel free to download, modify or publish this code as you want.
Visit suyeon.org for more information.
Setup
npm i qckwinsvc2 -g
Table of Contents
- Installing your service
- Uninstalling your service
- List installed services
- Start/Stop services
- Disclaimer
Installing your service
Interactively
> qckwinsvc2 install
[INPUT] Please provide a name for your service: Hello
[INPUT] Please provide a description for your service: Greets the world
[INPUT] Please provide your script's path: C:\index.js
[OPTIONAL] Please provide your script's arguments:
[INFO] Service Hello installed.
[INFO] Service Hello started.
Non-interactively
> qckwinsvc2 install name="Hello" description="World" path="C:\index.js" args="-a -c" now
[INFO] Service Hello installed.
[INFO] Service Hello started.
Uninstalling your service
Interactively
> qckwinsvc2 uninstall
[INPUT] Please provide a name for your service: Hello
[INFO] Service Hello stopped.
[INFO] Service Hello uninstalled.
Non-interactively
> qckwinsvc2 uninstall name="Hello"
[INFO] Service Hello stopped.
[INFO] Service Hello uninstalled.
Start and stop your service
Interactively
> qckwinsvc2 start
[INPUT] Please provide a name for your service: Hello
[INFO] Service Hello started.
Non-interactively
> qckwinsvc2 start name="Hello"
[INFO] Service Hello started.
List installed services
> qckwinsvc2 list
[INFO] Here's a list of all the services installed through qckwinsvc2:
[1] Hello
[2] World
Disclaimer
Made with ♡ by Suyeon® feel free to download, modify or publish this code as you want.
Visit suyeon.org for more information.