Look at the code below! You will understand what I want:
@echo off
setx myname king
echo %myname%
setx myname Queen
echo %myname%
Output:
king
king //Why did it not change?? whats wrong? and how to change?
I even tried it after deleting the varable by :
REG delete HKCU\Environment /F /V myname
But still the output don't change!!