windows 如何使用 NSSM
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26371286/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to use NSSM
提问by CoilKid
This is probably glaringly obvious, but how do I "install" NSSM? according to the docs, I don't need to. If I wanted to use the GUI, I know that works (I've tested that) but when using cmd prompt or a batch file, it can't find it.
这可能非常明显,但我如何“安装”NSSM?根据文档,我不需要。如果我想使用 GUI,我知道它可以工作(我已经测试过了)但是当使用 cmd 提示符或批处理文件时,它找不到它。
I know that the docs say "...preferably somewhere in your PATH", but I'm not sure where that would be. (neither of the "program files" folders work.)
我知道文档说“......最好在你的路径中的某个地方”,但我不确定那会在哪里。(“程序文件”文件夹都不起作用。)
回答by Jens A. Koch
Place the nssm.exe file in a folder, which is already on your PATH variable
将 nssm.exe 文件放在一个文件夹中,该文件夹已经在您的 PATH 变量中
Use echo %PATH%
or set PATH
on the CLI to find out the folders.
使用echo %PATH%
或set PATH
在 CLI 上查找文件夹。
OR
或者
Place into C:\Programs\nssm
and then add this folder to your PATH env variable:
放入C:\Programs\nssm
并将此文件夹添加到您的 PATH 环境变量中:
setx PATH "%PATH%;C:\Programs\nssm" /M
setx PATH "%PATH%;C:\Programs\nssm" /M