title: How to add Python and the Python Scripts directory to a PATH variable?
body: <p>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):</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
  </code></pre>
  
  <p>But CMD returns this:</p>
  
  <blockquote>
    <p>The filename, directory name, or volume label syntax is incorrect.</p>
  </blockquote>
  
  <p>Anyway, may please someone give me an example? How should I write command above into windows's CMD?</p>
  
  <hr>
  
  <p>None of these work:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[Environment]::SetEnvironmentVariable("C:/", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")
  [Environment]::SetEnvironmentVariable("Path", "C:/;C:\Python27\;C:\Python27\Scripts\", "User")
  </code></pre>