Non-Sucking "Non-Sucking Service Manager" Manager
Because NSSM kinda sucks, actually
This script is a wrapper for the good ol' nssm.exe and actually requires it. I found it very silly to have to open the cmd, then run a command just to open a GUI (nssm install <ServiceName>).
Running multiple commands with nssm set <ServiceName> option value isn't much better.
In my job, I find myself doing lots of service installs with similar configs and having to manually enter the same values over and over. That's why I decided to make a tool to make installs more repeatable.
NSNSSMCM assumes a simple, predictable structure:
nssm.exe,nsnssmcm.ps1, and your service folders live under a common root (e.g.C:\InstalledServices\)- Each service has its own folder named after the service
- Each service folder contains a
nsnssmcm.jsonfile
Example:
C:\InstalledServices\
├─ nssm.exe
├─ nsnssmcm.ps1
├─ MyService\
│ ├─ nsnssmcm.json
│ └─ (app files here)
└─ AnotherService\
├─ nsnssmcm.json
└─ (...)
This structure is opinionated, but it keeps things reproducible and predictable. You can deviate — just don’t expect sympathy.
If the service does not exist yet:
-
Create a folder named after your future service.
-
Place your application files inside (if applicable).
-
Run:
.\nsnssmcm.ps1 -New -ServiceName "MyService" -ApplicationPath "C:\Path\To\App.exe" -AppParameters "-arg1 -arg2"
This will:
- Install the service via NSSM
- Export its configuration to
./MyService/nsnssmcm.json - Start the service
After this point, the JSON file becomes the source of truth.
You can now version-control it, copy it, or replicate it elsewhere.
If you already have a working nsnssmcm.json:
-
Create a folder named after the service.
-
Drop the
nsnssmcm.jsonfile inside. -
Run:
.\nsnssmcm.ps1 -Import "MyService"
This will:
- Create the service if it doesn’t exist
- Apply all stored settings
- Start the service
To fully rebuild from config:
.\nsnssmcm.ps1 -Reset "MyService"
This removes and recreates the service from the JSON definition.
If you created a service manually (using the GUI or CLI), you can bring it under NSNSSMCM's control:
.\nsnssmcm.ps1 -Export "MyService"
This generates a nsnssmcm.json for an existing NSSM-managed service.
Once exported, the configuration becomes portable and reproducible.
The GUI is a bootstrap tool. The JSON file is the truth. The script is the enforcement layer.
If something changes, change the JSON.
If you want to be certain, use -Reset.
Clicking through dialogs repeatedly is not a deployment strategy.
Someone please make a GUI wrapper and call it NSNSNSSMCMM.