Allow specifying output streams.
[nssm.git] / README.txt
index e4df0e2..b772c36 100644 (file)
@@ -1,5 +1,5 @@
 NSSM: The Non-Sucking Service Manager\r
-Version 2.9, 2011-02-28\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
@@ -28,6 +28,22 @@ Since version 2.8, NSSM tries harder to shut down the managed application
 gracefully and throttles restart attempts if the application doesn't run\r
 for a minimum amount of time.\r
 \r
+Since version 2.11, NSSM respects srvany's AppEnvironment parameter.\r
+\r
+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
@@ -121,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
@@ -168,6 +211,9 @@ Building NSSM from source
 NSSM is known to compile with Visual Studio 6, Visual Studio 2005 and Visual\r
 Studio 2008.\r
 \r
+NSSM will also compile with Visual Studio 2010 but the resulting executable\r
+will not run on versions of Windows older than XP SP2.\r
+\r
 \r
 Credits\r
 -------\r
@@ -180,6 +226,15 @@ registry value for AppDirectory confused NSSM.
 Thanks to Peter Wagemans and Laszlo Keresztfalvi for suggesting throttling restarts.\r
 Thanks to Eugene Lifshitz for finding an edge case in CreateProcess() and for\r
 advising how to build messages.mc correctly in paths containing spaces.\r
+Thanks to Rob Sharp for pointing out that NSSM did not respect the\r
+AppEnvironment registry value used by srvany.\r
+Thanks to Szymon Nowak for help with Windows 2000 compatibility.\r
+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