- May
- 13,813
- 211
Code:
v:\> set /u foo
foo
v:\> echo %@pset[%@pid[explorer.exe],foo]
foo
v:\> echo %@regsetenv[HKCU\Environment\foo,REG_SZ,bar]
0
v:\> set /u foo
bar
v:\> echo %@pset[%@pid[explorer.exe],foo]
foo
Using Spy++ I could not find any windows receiving WM_SETTINGSCHANGE (or any message) when I used @REGSETENV. I'm pretty sure Explorer acts on that message. But above, Explorer's foo remained unchanged.