Allow setting application priority.
[nssm.git] / README.txt
index 6955ba4..98cec77 100644 (file)
@@ -53,6 +53,8 @@ Since version 2.19, NSSM can add to the service's environment by setting
 AppEnvironmentExtra in place of or in addition to the srvany-compatible\r
 AppEnvironment.\r
 \r
+Since version 2.22, NSSM can set the managed application's process priority.\r
+\r
 Since version 2.22, NSSM can rotate existing output files when redirecting I/O.\r
 \r
 Since version 2.22, NSSM can set service display name, description, startup\r
@@ -160,6 +162,15 @@ 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
+Application priority\r
+--------------------\r
+NSSM can set the priority class of the managed application.  NSSM will look in\r
+the registry under HKLM\SYSTEM\CurrentControlSet\Services\<service>\Parameters\r
+for the REG_DWORD entry AppPriority.  Valid values correspond to arguments to\r
+SetProcessPriorityClass().  If AppPriority() is missing or invalid the\r
+application will be launched with normal priority.\r
+\r
+\r
 Stopping the service\r
 --------------------\r
 When stopping a service NSSM will attempt several different methods of killing\r
@@ -324,6 +335,7 @@ run NSSM itself.  The parameters recognised are as follows:
   DisplayName: Service display name.\r
   ImagePath: Path to the service executable.\r
   ObjectName: User account which runs the service.\r
+  Name: Service key name.\r
   Start: Service startup type.\r
   Type: Service type.\r
 \r
@@ -381,6 +393,23 @@ exit code of 2, run
     nssm set <servicename> AppExit 2 Exit\r
 \r
 \r
+The AppPriority parameter is used to set the priority class of the\r
+managed application.  Valid priorities are as follows:\r
+\r
+  REALTIME_PRIORITY_CLASS\r
+  HIGH_PRIORITY_CLASS\r
+  ABOVE_NORMAL_PRIORITY_CLASS\r
+  NORMAL_PRIORITY_CLASS\r
+  BELOW_NORMAL_PRIORITY_CLASS\r
+  IDLE_PRIORITY_CLASS\r
+\r
+\r
+The Name parameter can only be queried, not set.  It returns the service's\r
+registry key name.  This may be useful to know if you take advantage of\r
+the fact that you can substitute the service's display name anywhere where\r
+the syntax calls for <servicename>.\r
+\r
+\r
 The ObjectName parameter requires an additional argument only when setting\r
 a username.  The additional argument is the password of the user.\r
 \r
@@ -486,11 +515,17 @@ To remove the server:
 \r
     nssm remove UT2004 confirm\r
 \r
+To find out the service name of a service with a display name:\r
+\r
+    nssm get "Background Intelligent Transfer Service" Name\r
+\r
 \r
 Building NSSM from source\r
 -------------------------\r
-NSSM is known to compile with Visual Studio 2008.  Older Visual Studio\r
-releases may or may not work.\r
+NSSM is known to compile with Visual Studio 2008 and later.  Older Visual\r
+Studio releases may or may not work if you install an appropriate SDK and\r
+edit the nssm.vcproj and nssm.sln files to set a lower version number.\r
+They are known not to work with default settings.\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.  If you require\r
@@ -524,6 +559,7 @@ Thanks to Russ Holmann for suggesting that the shutdown timeout be configurable.
 Thanks to Paul Spause for spotting a bug with default registry entries.\r
 Thanks to BUGHUNTER for spotting more GUI bugs.\r
 Thanks to Doug Watson for suggesting file rotation.\r
+Thanks to Арслан Сайдуганов for suggesting setting process priority.\r
 \r
 Licence\r
 -------\r