I haven't used "setx" myself but a doc page at
http://ss64.com/nt/setx.html[
^] says:
Quote:
Because SETX writes variables to the master environment in the registry, edits will only take effect when a new command window is opened - they do not affect the current CMD or PowerShell session.
In other words, after setting the value with 'setx', you need to discard the window you are in and open a new one.