Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, I need to switch Cygwin sshd service from 'ntsec' to 'nontsec' mode on quite a few Windows machines without re-installing the service.

share|improve this question
up vote 0 down vote accepted

The variables are stored under

/HKLM/SYSTEM/CurrentControlSet/Services/{service name}/Parameters/Environment

registry key. So, the following commands do the trick for sshd example:

regtool set /HKLM/SYSTEM/CurrentControlSet/Services/sshd/Parameters/Environment/CYGWIN nontsec
# don't run the following commands one-by-one unless you want to lose remote access
cygrunsrv -E sshd && cygrunsrv -S sshd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.