- May
- 382
- 2
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.
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