On 2020-12-31 08:04, Bill Stewart wrote:
On Wed, Dec 30, 2020 at 1:09 PM Oleksandr Gavenko wrote:
What way can I pass env var "CYGWIN" to the Cygwin service?
cygrunsrv --help shows this:
-e, --env <VAR=VALUE>    Optional environment strings which are added
to the environment when service is started. You can add up to 255
environment strings using the `--env' option.
These are added as REG_SZ values in
HKLM\SYSTEM\CurrentControlSet\Services\<servicename>\Parameters\Environment
registry subkey.

The HKLM/System env vars are where I would expect to add env vars to be used by all services or any particular service. For visibility, I would make them global HKLM/System env vars, or load them from /etc/config files.

The HKCU/HKU env vars are only used by processes running under a user login.

--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to