title: Which Windows Registry Key(s) store the PATH variable?
body: <p>A script needs to add a program to the Windows PATH.  Another script needs to remove that same program from the Windows PATH.  For compatibility issues, the script needs to work on most if not all flavors of Windows.  </p>
  
  <blockquote>
    <p>Which registry key (or keys) consistently store the PATH on a wide range of Windows machine types?</p>
  </blockquote>
  
  <p>For example, on my Windows 10 Home Edition laptop, the PATH is stored in the <code>Path</code> property of the following key:  </p>
  
  <pre><code>HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  </code></pre>
  
  <p>But another user informs me this key is not available on his or her Windows machine.  </p>
  
  <p>So what is the complete list of key location possibilities?  </p>
  
  <p>Note that the scripts are targeting the keys directly because the changes to the PATH must persist after the end of runtime.  Other approaches seem to only temporarily change the PATH while the program is running.  </p>