Skip to content

Instantly share code, notes, and snippets.

@danesparza
Created May 3, 2016 16:54
Show Gist options
  • Save danesparza/22e5dd3992fbb5a3ab7e621d787ce707 to your computer and use it in GitHub Desktop.
Save danesparza/22e5dd3992fbb5a3ab7e621d787ce707 to your computer and use it in GitHub Desktop.
NSSM based service installation/removal scripts
@echo off
set InstallFolder="d:\services\centralconfig"
nssm install centralconfig %InstallFolder%\centralconfig_windows_amd64.exe
nssm set centralconfig AppParameters serve
nssm set centralconfig Description CentralConfig REST config service
nssm set centralconfig Start SERVICE_AUTO_START
nssm set centralconfig AppStdout %InstallFolder%\centralconfig.log
nssm set centralconfig AppStderr %InstallFolder%\centralconfig.log
net start centralconfig
@echo off
net stop centralconfig
nssm remove centralconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment