I'm trying to add Python and the Python scripts directory to the PATH variable. Here is the command I'm writing into CMD (I'm using Windows 8.1):
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
But CMD returns this:
The filename, directory name, or volume label syntax is incorrect.
Anyway, may please someone give me an example? How should I write command above into windows's CMD?
None of these work:
[Environment]::SetEnvironmentVariable("C:/", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
[Environment]::SetEnvironmentVariable("Path", "C:/;C:\Python27\;C:\Python27\Scripts\", "User")