I have a question regarding environment variables in Windows. So, I set an environment variable using SETX command:
SETX my_var VAR
After that, I use SET m to see if my variable is set. It shows it isn't. However, the variable appears in HKCU\Environment. I exit the command prompt window and open a new one. Typing SET m again makes my variable appear. I restart explorer.exe and open a new command prompt window. When using SET m, my variable isn't there anymore, but it is in HKCU\Environment.
I don't understand this behavior. Shouldn't it appear also after restarting explorer.exe, giving the fact that it is still in HKCU\Environment? I am missing something, I just don't understand what.
Later edit: I have tried doing the same thing on a computer running Windows 7 and I found out there is no problem. Don't know what is wrong in my case. I want anyway to thank everybody for their help.