See above
Quote:
I think you should be using HKCU\Environment\
Either way, I doubt if it would become available until Windows reads the registry entry again, which is usually at Logon

I just tested with
//echo -a $regwrite(HKCU\Environment\Sheep,Baaa)
and it worked fine (after logoff/logon or opening/closing "sysdm.cpl > Advanced > Environment Variables")

I don't know of a way to force Windows to reread the registry hives smirk maybe somoene else does...