Welcome!

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

SignUp Now!

WinXP SP3 @PSET and SET /E /V interaction

There's a really weird interaction between two seemingly independent processes (Explorer and TCC) running on WinXP SP3. The same code has never given me the same problem on WinXP SP2 PCs, and it's been in use for a long time.
I have a logon.btm script which sets some variables in Explorer using @PSET. The idea is to make those variables visible to all of Explorer's children processes until shutdown. And it works like that on SP2. On SP3 instead, the new variables are created inside Explorer as expected. However, as soon as I start my first TCC - the logon.btm one has already terminated - I can Explorer looses the variables that were created with @PSET. Just those ones, not all variables.
I traced my 4START.btm and found the culprit. After a SET /E /V some_other_variable command is executed, Explorer loses the variables.
Code:
REM logon.btm:
  set foo=%_batchname
  set pid=1234 & rem substitute 1234 with logon Explorer's PID
  echo %@pset[%pid%,foo=%foo%] >nul
Code:
REM 4START.btm
  *set /e /v SHRALIAS_SAVE_PATH=%@path[%_cmdspec]logs\%_WINNAME %+ rem ...
Code:
TCC  9.02.147   Windows XP [Version 5.1.2600]
Loaded plugins:
Name:        4AUTOTRAY
Version:     1.1  Build 1
Name:        4CONSOLE
Version:     6.6  Build 6
Name:        4MMFILE
Version:     1.1  Build 1
Name:        4THREADS
Version:     6.6  Build 6
Name:        4UTILS
Version:     6.6  Build 14
Name:        EV
Version:     3.0  Build 1815
Name:        HISTWORD
Version:     6.6  Build 6
Name:        RB_UTILS
Version:     2.1  Build 8
Name:        SYSUTILS
Version:     6.6  Build 6
 
On Mon, 11 Aug 2008 12:50:50 -0500, Stefano Piccardi <>
wrote:


>There's a really weird interaction between two seemingly independent processes (Explorer and TCC) running on WinXP SP3. The same code has never given me the same problem on WinXP SP2 PCs, and it's been in use for a long time.
>I have a logon.btm script which sets some variables in Explorer using @PSET. The idea is to make those variables visible to all of Explorer's children processes until shutdown. And it works like that on SP2. On SP3 instead, the new variables are created inside Explorer as expected. However, as soon as I start my first TCC - the logon.btm one has already terminated - I can Explorer looses the variables that were created with @PSET. Just those ones, not all variables.
>I traced my 4START.btm and found the culprit. After a SET /E /V some_other_variable command is executed, Explorer loses the variables.

It sounds like Explorer is rebuilding its environment in response to a
WM_SETTINGCHANGE message (from SET /V) and, in the process, not preserving
variables it doesn't expect to be there. I'd be surprised if that changed with
SP3 but in any event I don't think I can do anything about it.

However, SET /V seems sufficient to get a variable into Explorer.
 
Thanks Vince, it's exactly like you said. I can get around with SET /V. I think that Explorer changed between SP2 and SP3 wrt this behavior.
 
Thanks Vince, it's exactly like you said. I can get around with SET /V. I think that Explorer changed between SP2 and SP3 wrt this behavior.


XP/SP2 behaves as you describe XP/SP3. With all three TCC's started from Start/Run

session 1. echo %@pset[explorer_pid,foo=bar]; start session 2

session 2. set (see foo=bar); set /v boo=far; start session 3.

session 3. foo is not set.
 
Back
Top
[FOX] Ultimate Translator
Translate