[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problematic temporary BAT files
From: |
Eli Zaretskii |
Subject: |
Re: Problematic temporary BAT files |
Date: |
Sat, 18 Oct 2014 08:48:09 +0300 |
> Date: Sat, 18 Oct 2014 00:48:07 +0200
> From: Bostjan Mihoric <address@hidden>
>
> I thought the problem was with the temporary folder under
> CSIDL_PROFILE. The TEMP environment variable is set to it as a side
> effect. But you seem to be saying that no matter which folder TEMP
> points at, that folder would be regarded as a "temporary folder", is
> that right? How can this make sense, if TEMP can be set differently
> in every console cmd session a user has?
>
>
> Ah, I see. Up until now, I knew that I could override temporary folder for the
> console session. But I thought that any new program that gets launched, will
> have the system value restored (including Make, of course).
This is only so for programs invoked from a desktop shortcut, or from
the Start->Run dialog, or by double clicking in Explorer. For those,
the parent process is the Windows Explorer, so those programs get the
system-wide values of these variables.
But for a program invoked from the cmd window, the parent process is
cmd.exe, so it gets environment variables set in that cmd window.
> The test I just performed shows otherwise (child process inherits
> the value). This means I can probably use this localized redirection
> of temporary folder.
>
> Thank you for your help!
You are welcome.