Welcome!

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

SignUp Now!

TCC passing expanded envvar to children?

May
12,846
164
TITLEPROMPT in permanently in the /S(ystem) environment. Below, in TCC, TITLEPROMPT is set correctly. I start PowerPro. In PowerPro's environment, TITLEPROMPT has been expanded. It doesn't happen when I start another version of TCC. But, then again, only TCC knows how to expand the variables in TITLEPROMPT. I have no idea what's going on.

Code:
v:\> set titleprompt
%[_4VER].%[_BUILD]$s$s[%_PID]$s$s$p

v:\> start l:\PowerPro\powerpro.exe

v:\> echo %@pset[%@pid[powerpro.exe],titleprompt]
21.01.52$s$s[2112]$s$s$p
 
How do you know that it is expanded in PowerPro's environment? I think that @PSET is returning the original value, which TCC's variable expansion then further expands before passing it on to ECHO. Try it with CMD.EXE instead of PowerPro; you can use SET to examine CMD's environment.
 
How do you know that it is expanded in PowerPro's environment? I think that @PSET is returning the original value, which TCC's variable expansion then further expands before passing it on to ECHO. Try it with CMD.EXE instead of PowerPro; you can use SET to examine CMD's environment.
Yes, you're right (how dumb of me!). But something very strange happened last night. My login script, which is run by TCCv13, failed and didn't start PowerPro. So I manually started PowerPro using TCCv20. After that I noticed that all versions of TCC (back to v11), when started from a PowerPro list, opened with the v20 TITLEPROMPT.

I just repeated that experiment three times and each time, TCCv20 gave PowerPro the expanded TITLEPROMPT. Today I verified it by looking at PowerPro's environment with ProcessExplorer.

upload_2017-9-26_11-16-59.png


And, yes, it does it with CMD also.

upload_2017-9-26_11-24-40.png
 
My fault again. I had an experimental (and buggy) TCSTART.BTM in place for v20. There's no longer a problem.
 

Similar threads

Back
Top