1

How to read environment variables of a specific user in windows with nodejs? Tried using process.env but it seems to return only system variables.

1

1 Answer 1

1

There is no such distinction of user's vs. system environment variables. You can access all of the environment variables that are set for your process by accessing process.env. If something is missing there then it means that there is no such environment variable set. If you need more environment variables being set then either set them before starting your Node program or change the user's config so that they are set automatically.

Sign up to request clarification or add additional context in comments.

1 Comment

In the Windows operating system, if you go to System Properties, and click the "Environment variables..." button, then it displays both "User variables for <username>" and "System variables." How do you run a Node process so that the environment variables set for that process include both of the above?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.