Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

@REGSETENV not broadcasting message?

May
12,846
164
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.
 
Do you get the same results when using the 64-bit registry?

From the help;
If you are running a 64-bit version of Windows, you can access the 64-bit registry instead of the 32-bit registry by appending "_64" to the HKEY name.

Joe
 
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:\>
 

Similar threads

Back
Top