16-bit %temp% points to %systemroot%\temp

From: Gordon Fecyk (gordonf_at_pan-am.ca)
Date: 02/24/05


Date: Thu, 24 Feb 2005 11:59:09 -0600

I'm trying to restrict execute access on XP wherever a limited user has
write access to, including the temporary folders.

For 32-bit apps, %temp% points to %userprofile%\locals~1\temp (in short
filename mode too) and any apps creating temporary files store them here.
For 16-bit apps, for some reason, this points to %systemroot%\temp. This
breaks such things as printing from Internet Explorer when launched from a
16-it app.

To demonstrate, launch cmd.exe and type SET. Then launch command.com and
type SET and compare the two results.

Windows 2000 since Service Pack 3 behaved like this, too, until I applied a
patch described in KB840214, which normally applies to Win2K Terminal Server
but also applies to Win2K Pro. After applying KB840214, %temp% points to
the same place for 16-bit and 32-bit apps.

Is there a similar patch available for Windows XP? The MSKB returned no
results.

I've tried editing autoexec.nt and config.nt - %temp% gets overridden by the
operating system settings.

-- 
PGP key (0x0AFA039E): <http://www.pan-am.ca/consulting@pan-am.ca.asc>
Sometimes it's hard to tell where the game ends and where reality bites,
er, begins. <http://vmyths.com/resource.cfm?id=50&page=1>


Relevant Pages

  • Re: run console app from asp.net web application
    ... we've played around with the web service idea. ... Using the Process class I can launch processes ... for a variety of apps, ... "Gerry Hickman" wrote: ...
    (microsoft.public.vsnet.general)
  • Re: >> currentDb access.application
    ... Other launch examples that I proposed: ... to treat the other apps as library DBs) with the common objects. ... I just don't see any reason to maintain separate apps. ...
    (microsoft.public.access.modulesdaovba)
  • Re: WTF!!!
    ... > MY KDE is ridiculously slow, i have to wait a very noticeable amount ... This is becoming a real pisser, all apps take forever to launch, but run ... gnome so that i can identify if it is a KDE problem or not. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Project consisting of multiple projects
    ... Thanks for your response, Gregory. ... combination of four different applications. ... If they are four separate apps, you will have to create an app launcher ... you will have to launch them. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Logical Disk Manager fails to start
    ... with Office, where I either couldn't get apps to start at all, or ... indicated that the LDM remote tool was being blocked by the firewall, ... "Server execution failed" message every time I try to launch LDM. ... Event Source: DCOM ...
    (microsoft.public.windowsxp.help_and_support)

Loading