X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=README.txt;h=df918bdfab4a95d5be6fb4ec1c02341deb250053;hb=cca8d28295ce27b7c996b47badc6a1e3a6a34e65;hp=ded8b7a3c68c053e42d995d7f6ce6cbb2514bfa6;hpb=fa2f3fe4a81e6958717ae05f6d37af2da91bcd66;p=nssm.git diff --git a/README.txt b/README.txt index ded8b7a..df918bd 100644 --- a/README.txt +++ b/README.txt @@ -262,6 +262,17 @@ so the actual time to shutdown may be longer than the sum of all configured timeouts if the application spawns multiple subprocesses. +Console window +-------------- +By default, NSSM will create a console window so that applications which +are capable of reading user input can do so - subject to the service being +allowed to interact with the desktop. + +Creation of the console can be suppressed by setting the integer (REG_DWORD) +HKLM\SYSTEM\CurrentControlSet\Services\\Parameters\AppNoConsole +registry value to 1. + + I/O redirection --------------- NSSM can redirect the managed application's I/O to any path capable of being @@ -288,13 +299,6 @@ AppStderr to the same path, eg C:\Users\Public\service.log, and it should work. Remember, however, that the path must be accessible to the user running the service. -Note that if you set AppStdout and/or AppStderr, applications which attempt -to read stdin will fail due to a combination of factors including the way I/O -redirection is configured on Windows and how a console application starts in -a service context. NSSM can fake a stdin stream so that applications can -still work when they would otherwise exit when at end of file on stdin. Set -AppStdin to "|" (a single pipe character) to invoke the fake stdin. - File rotation ------------- @@ -354,7 +358,33 @@ environment variables which will be added to the service's environment. Each entry in the list should be of the form KEY=VALUE. It is possible to omit the VALUE but the = symbol is mandatory. -srvany only supports AppEnvironment. +Environment variables listed in both AppEnvironment and AppEnvironmentExtra +are subject to normal expansion, so it is possible, for example, to update the +system path by setting "PATH=C:\bin;%PATH%" in AppEnvironmentExtra. Variables +are expanded in the order in which they appear, so if you want to include the +value of one variable in another variable you should declare the dependency +first. + +Because variables defined in AppEnvironment override the existing +environment it is not possible to refer to any variables which were previously +defined. + +For example, the following AppEnvironment block: + + PATH=C:\Windows\System32;C:\Windows + PATH=C:\bin;%PATH% + +Would result in a PATH of "C:\bin;C:\Windows\System32;C:\Windows" as expected. + +Whereas the following AppEnvironment block: + + PATH=C:\bin;%PATH% + +Would result in a path containing only C:\bin and probably cause the +application to fail to start. + +Most people will want to use AppEnvironmentExtra exclusively. srvany only +supports AppEnvironment. Managing services using the GUI @@ -486,6 +516,13 @@ invocation is valid and will have the expected effect. nssm set ObjectName correct horse battery staple +The following well-known usernames do not need a password. The password +parameter can be omitted when using them: + + "LocalSystem" aka "System" aka "NT Authority\System" + "Local Service" aka "NT Authority\Local Service" + "Network Service" aka "NT Authority\Network Service" + The Start parameter is used to query or set the startup type of the service. Valid service startup types are as follows: @@ -633,6 +670,7 @@ affinity support. Thanks to Andrew RedzMax for suggesting an unconditional restart delay. Thanks to Bryan Senseman for noticing that applications with redirected stdout and/or stderr which attempt to read from stdin would fail. +Thanks to Czenda Czendov for help with Visual Studio 2013 and Server 2012R2. Licence -------