0

I am trying to add new Environment variable in my windows 10 system , i am using below powershell command to add System variable

$env:ITH_PYTHON_PATH = 'C:\Python27\Python.exe'

i can see command is successful in adding the new values, and i can get back value when i use command $env:ITH_PYTHON_PATH.

  1. I cannot see updated path when i manually go to the system property Environment variable
  2. After reboot $env:ITH_PYTHON_PATH is also not seen.

Is there any better way to add environment variable permanently?

1 Answer 1

5

Would something like this work?

[Environment]::SetEnvironmentVariable("ITH_PYTHON_PATH", "C:\Python27\Python.exe", "Machine")
Sign up to request clarification or add additional context in comments.

1 Comment

please tell me about the last parameter "Machine". What it does?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.