- May
- 13,813
- 211
Elsewhere, I posted this.
EXEC would also benefit from this (at least optionally). I use EXEC (with no argument) often ... when I want a "fresh" instance of TCC. A new, pristine, environment would make that instance even fresher.
When I execute START /UNELEVATED d:\tc33\tcc.exe in an elevated TCC, the started process inherits the current environment. That's a small problem for me because my TCSTART.BTM changes PROMPT if TCC is elevated. The newly-started TCC is not elevated but it inherits my elevated PROMPT. There are other ways around this, but ...
I have my own RUNDOWN.EXE (more aptly named SPOOFPPID.EXE) and it suffered from the same problem. RUNDOWN.EXE uses Explorer (or a specified PID) as the parent of the new process. I worked around the problem in an obvious way (CreateEnvironmentBlock, use it CreateProcess along with the flag CREATE_UNICODE_ENVIRONMENT. I'll post code if you want.
EXEC would also benefit from this (at least optionally). I use EXEC (with no argument) often ... when I want a "fresh" instance of TCC. A new, pristine, environment would make that instance even fresher.