Allow setting application priority.
[nssm.git] / README.txt
index 72f7ea4..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
@@ -382,6 +393,17 @@ 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
@@ -537,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