Re: %temp% points to %systemroot%\temp instead of %userprofile%\LocalS~1\temp

From: Pegasus \(MVP\) (I.can_at_fly.com)
Date: 03/28/05


Date: Mon, 28 Mar 2005 10:33:54 +1000

What you write sounds fine but is at variance with
my own WinXP Professional installation.

When I use the recommended method of setting the
user's %temp% variable to c:\ABCXYZ (i.e. via Control
Panel / System etc), and when I then invoke a 16-bit
application (e.g. command.com) then the temp variable is
set to c:\ABCXYZ. This happens without me touching
autoexecec.nt. The value of the System %temp% variable
was set to c:\Temp.

"Gordon Fecyk" <gordonf@pan-am.ca> wrote in message
news:eEPZsuxMFHA.2420@TK2MSFTNGP12.phx.gbl...
> > This is not the correct way to set environmental variables
> > under Windows 2000.
>
> We're talking about XP. KB840214 fixes this problem in Win2K.
>
> We're also talking about the 16-bit environment (NTVDM) which, for reasons
> unknown to me, uses a different environment from the rest of the system.
>
> The 16-bit environment ignores %temp% and %tmp% set in the per-user
> environment variable settings (control panel / system) and instead uses
the
> per-system environment for that. You can alter the 16-bit environment
> separately from the 32-bit environment by manipulating autoexec.nt, which
is
> not covered anywhere in Help. In fact, it's covered in KB314495:
>
> "Any environment variables required by the [16-bit] Windows-based program
> should be located in the Autoexec.nt file; if they are, Windows will use
> them appropriately."
>
> Any environment variables except for %temp% and %tmp%, apparently.
>
> You can even try changing %temp% after the fact, for example in
command.com
> (set temp=whatever), and the change will appear to take (the changed
setting
> appears if you type 'set' by itself). But apps launched from there still
> ignore it, writing temp files to %systemroot%\temp.
>
> --
> PGP key (0x0AFA039E): <http://www.pan-am.ca/consulting@pan-am.ca.asc>
> Prevent problems before they happen and help others avoid bad design.
> <http://www.pan-am.ca/antiwindowscatalog/>
>
>



Relevant Pages

  • Re: Environment Variables
    ... It is the TEMP, TMP, and the ... with where clipper builds it's "scratch" files. ... TMP, and the CLIPPER swappath and temppath ... TEMP, TMP, and CLIPPER environment variables ...
    (comp.lang.clipper)
  • Re: Environment Variables
    ... what is using the "TEMP" environment variable, your program or other programs you "run"? ... Randy H. wrote: ... be able to change the setting for that TEMP directory depending upon who ...
    (comp.lang.clipper)
  • Re: Check the temp enviroment variable
    ... and can be set for certain needs of different software programs. ... physical location of temporary storage is one of those environment ... It's identified by TEMP or TMP in the environment variables ...
    (microsoft.public.office.misc)
  • Re: Mex file
    ... %TEMP% must contain the name of a writable directory. ... The error message seems pretty straightforward. ... Does the environment ... or via the Control Panel (do a Google search for "Windows environment ...
    (comp.soft-sys.matlab)
  • Re: British sailors had been spying on Iran
    ... gather information about the environment in which they're working; ... temp, pressure, salinity, water temp; bathy 'dips'; soundings etc. etc. ... Noah was forced to rely on the ship's onboard sensors. ... Mark Borgerson ...
    (sci.military.naval)

Quantcast