Allow specifying output streams.
[nssm.git] / README.txt
index 0d8026f..b772c36 100644 (file)
@@ -1,5 +1,5 @@
 NSSM: The Non-Sucking Service Manager\r
-Version 2.14, 2012-05-24\r
+Version 2.16, 2012-12-01\r
 \r
 NSSM is a service helper program similar to srvany and cygrunsrv.  It can \r
 start any application as an NT service and will restart the service if it \r
@@ -33,6 +33,17 @@ Since version 2.11, NSSM respects srvany's AppEnvironment parameter.
 Since version 2.13, NSSM is translated into French.\r
 Thanks François-Régis Tardy.\r
 \r
+Since version 2.15, NSSM is translated into Italian.\r
+Thanks Riccardo Gusmeroli.\r
+\r
+Since version 2.17, NSSM can try to shut down console applications by\r
+simulating a Control-C keypress.  If they have installed a handler routine\r
+they can clean up and shut down gracefully on receipt of the event.\r
+\r
+Since version 2.17, NSSM can redirect the managed application's I/O streams\r
+to an arbitrary path.\r
+\r
+\r
 Usage\r
 -----\r
 In the usage notes below, arguments to the program may be written in angle \r
@@ -126,6 +137,33 @@ request to suicide if you explicitly configure a registry key for exit code 0.
 If only the default action is set to Suicide NSSM will instead exit gracefully.\r
 \r
 \r
+I/O redirection\r
+---------------\r
+NSSM can redirect the managed application's I/O to any path capable of being\r
+opened by CreateFile().  This enables, for example, capturing the log output\r
+of an application which would otherwise only write to the console or accepting\r
+input from a serial port.\r
+\r
+NSSM will look in the registry under\r
+HKLM\SYSTEM\CurrentControlSet\Services\<service>\Parameters for the keys\r
+corresponding to arguments to CreateFile().  All are optional.  If no path is\r
+given for a particular stream it will not be redirected.  If a path is given\r
+but any of the other values are omitted they will be receive sensible defaults.\r
+\r
+  AppStdin: Path to receive input.\r
+  AppStdout: Path to receive output.\r
+  AppStderr: Path to receive error output.\r
+\r
+Parameters for CreateFile() are providing with the "AppStdinShareMode",\r
+"AppStdinCreationDisposition" and "AppStdinFlagsAndAttributes" values (and\r
+analogously for stdout and stderr).\r
+\r
+In general, if you want the service to log its output, set AppStdout and\r
+AppStderr to the same path, eg C:\Users\Public\service.log, and it should\r
+work.  Remember, however, that the path must be accessible to the user\r
+running the service.\r
+\r
+\r
 Removing services using the GUI\r
 -------------------------------\r
 NSSM can also remove services.  Run\r
@@ -194,6 +232,9 @@ Thanks to Szymon Nowak for help with Windows 2000 compatibility.
 Thanks to François-Régis Tardy for French translation.\r
 Thanks to Emilio Frini for spotting that French was inadvertently set as\r
 the default language when the user's display language was not translated.\r
+Thanks to Riccardo Gusmeroli for Italian translation.\r
+Thanks to Eric Cheldelin for the inspiration to generate a Control-C event\r
+on shutdown.\r
 \r
 Licence\r
 -------\r