@REGSETENV not broadcasting message?

May 20, 2008
10,671
83
Syracuse, NY, USA
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.
 
May 20, 2008
10,671
83
Syracuse, NY, USA
Do you get the same results when using the 64-bit registry?

Yes. But don't I get the 64-bit registry by default with the 64-bit TCC?

I had to download an ancient copy of my own SETENV.EXE to make the test below. I couldn't use SETP below; it doesn't work.

Code:
v:\> set /u foo
foo

v:\> tasklist | findstr explorer
 7416  explorer          Program Manager

v:\> echo %@pset[7416,foo]
foo

v:\> echo %@regsetenv[HKCU\Environment\foo,REG_SZ,bar]
0

v:\> echo %@pset[7416,foo]   <================ it's still "foo"
foo

v:\> setenv -u foo bar

v:\> echo %@pset[7416,foo]  <================ now it's "bar"
bar

v:\> setp 7416 foo
TCC: Not in environment "foo"

v:\>
 
Thread starter Similar threads Forum Replies Date
MikeBaas Support 14
Joe Caverly Support 7