Skip to end of banner
Go to start of banner

Service management

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

To run a batch file or program as a service, you need an intermediate tool.

https://nssm.cc/ does all you need for your services. It’s free and open source. There exists a repository on Github with this name, but it is not managed by the author of the app. So, avoid it.

Install a service

nssm.exe install "service-name" , which will open a GUI to configure the service.

Later, you can edit the service by using: nssm.exe edit "service-name" .

To see list of services on a Windows machine, the official tool is services.msc . Nssm is convenient because you can manage any service from the machine.

Configure a service

Select which file you want to run, from where, and optional arguments.

Service restart

Nssm can automatically restarts a finished (or crashed) service. This is the default setting.

I/O redirection

Nssm can log output of your service in a given file. It’s convenient to debug issues.

User credentials

By default, your service runs on local SYSTEM account. If you need administrator access, simply create a user with those rights, and then use this account to run service:

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.