Daily Shaarli
May 2, 2022
unAsService is a command line tool that allows you to setup a regular console application to run as a service.
This tool requires that .NET Framework 4.5 be already installed on your computer. If you do not have .NET Framework 4.5 this tool will display a message and not run.
IMPORTANT: Any services you install using this tool will require that this tool remain on that computer in the same location in order for those services to continue functioning. Therefore before installing any services you should make sure this tool is somewhere where it can remain permanently. If you do end up moving this tool use the 'fixservices' action to fix the existing services. (details on how to use 'fixservices' can be found below)
RunAsService Typing just the name of the tool without specifying any parameters. Or specifying incorrect paramters will bring you to this help screen you are currently reading.
RunAsService install [Name] [Display Name] PathToExecutable [Args] Name The name of the service, if none is specified the name will default to the name of the executable.
nssm is a service helper which doesn't suck. srvany and other service helper programs suck because they don't handle failure of the application running as a service. If you use such a program you may see a service listed as started when in fact the application has died. nssm monitors the running service and will restart it if it dies. With nssm you know that if a service says it's running, it really is. Alternatively, if your application is well-behaved you can configure nssm to absolve all responsibility for restarting it and let Windows take care of recovery actions.
nssm logs its progress to the system Event Log so you can get some idea of why an application isn't behaving as it should.
nssm also features a graphical service installation and removal facility. Prior to version 2.19 it did suck. Now it's quite a bit better.