3

I tried to set two environment variables using nssm set TestService AppEnvironmentExtra SOMEVAR=SOMEVALUE but only the last value is considered, one command overlaps the other

i try

nssm install TestService TestPath nssm set SystoreApi AppEnvironmentExtra SOME_VAR1=SOME_VALUE1 nssm set SystoreApi AppEnvironmentExtra SOME_VAR2=SOME_VALUE2

bout only SOME_VAR2=SOME_VALUE2 was save

imagem of problem

1 Answers1

4

When setting an environment block with nssm set, each variable should be specified as a KEY=VALUE pair in a separate argument.

In the official documentation under "Non-standard parameters" there is the following example:

nssm set <servicename> AppEnvironmentExtra CLASSPATH=C:\Classes TEMP=C:\Temp