X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=README.txt;h=12a83939ffef5e3b20e0abcf42da875576b54ae2;hb=3e92dce8716991c7100ea55f0b5e202a05c1b56d;hp=2158741ce032cb10f9fe65a70544fa0943713df6;hpb=6adc886e1fa296f67aacef0c01994e302e8caf86;p=nssm.git diff --git a/README.txt b/README.txt index 2158741..12a8393 100644 --- a/README.txt +++ b/README.txt @@ -638,9 +638,10 @@ would have the same effect. Non-standard parameters ----------------------- -The AppEnvironment and AppEnvironmentExtra parameters recognise an -additional argument when querying the environment. The following syntax -will print all extra environment variables configured for a service +The AppEnvironment, AppEnvironmentExtra and Environment parameters +recognise an additional argument when querying the environment. The +following syntax will print all extra environment variables configured +for a service nssm get AppEnvironmentExtra @@ -655,6 +656,39 @@ KEY=VALUE pair in separate command line arguments. For example: nssm set AppEnvironment CLASSPATH=C:\Classes TEMP=C:\Temp +Alternatively the KEY can be prefixed with a + or - symbol to respectively +add or remove a pair from the block. + +The following two lines set CLASSPATH and TEMP: + + nssm set AppEnvironment CLASSPATH=C:\Classes + nssm set AppEnvironment +TEMP=C:\Temp + +If the key is already present, specifying +KEY will override the value +while preserving the order of keys: + + nssm set AppEnvironment +CLASSPATH=C:\NewClasses + +The following syntax removes a single variable from the block while +leaving any other variables in place. + + nssm set AppEnvironment -TEMP + +Specifying -KEY=VALUE will remove the variable only if the existing +value matches. + +The following syntax would not remove TEMP=C:\Temp + + nssm set AppEnvironment -TEMP=C:\Work\Temporary + +The + and - symbols are valid characters in environment variables. +The syntax :KEY=VALUE is equivalent to KEY=VALUE and can be used to +set variables which start with +/- or to explicitly reset the block in +a script: + + nssm set AppEnvironment :CLASSPATH=C:\Classes + nssm set AppEnvironment +TEMP=C:\Temp + The AppExit parameter requires an additional argument specifying the exit code to get or set. The default action can be specified with the string