NSSM - the Non-Sucking Service Manager

Description

nssm functions very much like srvany. When started by the system service manager, it looks in the registry for the key HKLM\System\CurrentControlSet\Services\servicename\Parameters and tries to start the program listed in Application, starting in the directory listed in AppDirectory and passing the option flags listed in AppParameters. The observant reader will notice that these values are the same as those which srvany reads, which means that nssm can be used as a direct replacement.

nssm's behaviour in regards to these registry settings changed in version 2.8. In previous versions nssm would only read the registry once, when the service was started. From version 2.8 onwards the registry is queried each time the monitored application is restarted. You no longer have to restart nssm itself after making changes to the registry.

nssm can be configured to take one of four actions when the application exits, and may even be configured to take different actions based on the application exit code. The possible actions are:

See the usage notes for instructions on setting one of these actions for your service.

nssm can redirect the monitored application's I/O to any destination capable of being opened with the CreateFile() system function, enabling you to capture status messages logged by the application, redirect input from named pipes, access serial ports and do other esoteric things. The usage notes have more details.

For details on how nssm runs the service and handles application failure, see the source code included in the download and check the flmonitor documentation. nssm is basically an abstraction of flmonitor.

Version 2.22

Version 2.22 is the single biggest update to nssm since its initial release. Major new features include: