Why is setx path not working?
<p>Can someone explain this result?</p>

<p>After setting path, it did not change. This was run in an Administrator command-line:</p>

<pre><code>C:\Windows\system32&gt;setx path "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin"

SUCCESS: Specified value was saved.

C:\Windows\system32&gt;path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin;D:\Program Files (x86)\metapad36;D:\Program Files (x86)\metapad36" /M
</code></pre>

<p>I've read that %PATH% = PATH variable for machine + PATH variable for user. Am I seeing the machine path + Admin's path?</p>

<p>Have looked at other articles on the topic, but still confused. </p>

<p>Should I clear the user paths, so there's no duplication?</p>

<p><strong>update</strong>: Re the tip that "variables created or modified by this tool will be available in future command windows" i open a <strong>non-admin</strong> window and enter:</p>

<pre><code>&gt;path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin;;D:\Program Files (x86)\metapad36;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin
</code></pre>

<p>The path is repeated twice. Ok, then at same prompt I <code>setx</code> the path without the repeat, and without <code>/M</code>:</p>

<pre><code>&gt;setx path "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin"

SUCCESS: Specified value was saved.
</code></pre>

<p>Apparently saved in current user environment. </p>

<p>Then i open a <strong><em>new</em></strong> <strong>non-admin</strong> command window, and:</p>

<pre><code>&gt;path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin;;D:\Program Files (x86)\metapad36;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;D:\Program Files (x86)\Microsoft VS Code\bin`
</code></pre>

<p>It has not changed. Why?</p>