Environment Variables: Short vs Long Pathnames? - "DOCUME~1" vs. "Documents and Settings"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello.

*** Is there a setting that tells Windows how/if/when it should expand environment variables to long vs. short pathnames? ***

I have two Windows XP boxes. (german, service pack 2)

On both machines the settings for the environment variable %TEMP% are
the same, that is:
HKEY_CURRENT_USER\Environment -
TEMP [REG_EXPAND_SZ] = %USERPROFILE%\Lokale Einstellungen\Temp

One one box resolving %TEMP% will yield the short pathname and on the
other box I'll get the long pathname. (Note that %USERPROFILE% will
yield the long path on both boxes

PC1:
C:\>echo %USERPROFILE%
C:\Dokumente und Einstellungen\Trappel

C:\>echo %TEMP%
C:\DOKUME~1\Trappel\LOKALE~1\Temp


PC2:
C:\>echo %USERPROFILE%
C:\Dokumente und Einstellungen\hammer

C:\>echo %TEMP%
C:\Dokumente und Einstellungen\hammer\Lokale Einstellungen\Temp

C:\>cd C:\DOKUME~1
C:\DOKUME~1> REM ... note here that the short pathname does exists

Opening %TEMP% via Start > Run ... will yield the same different
pathnames in the title bar of the new explorer windows so I'm *guessing*
it's not a cmd.exe issue but some explorer policy.

*** Does anyone know which setting in windows controls this different behaviour? ***

Add Info:
---------
Under
"My Computer" -> Properties -> Advanced Tab -> Environment Variables
the following is set:
* System: TEMP = "%SystemRoot%\TEMP" (this appears to be the Windows default) -- %SystemRoot% expands to C:\WINDOWS
* User: TEMP = "%USERPROFILE%\Lokale Einstellungen\Temp"


cheers,
Martin
.



Relevant Pages

  • Env Vars: "DOCUME~1" vs. "Documents and Settings"
    ... I have two Windows XP boxes. ... On both machines the settings for the environment variable %TEMP% are the same, ... One one box resolving %TEMP% will yield the short pathname and on the other box I'll get the long pathname. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Env Vars: "DOCUME~1" vs. "Documents and Settings"
    ... I have two Windows XP boxes. ... On both machines the settings for the environment variable %TEMP% ... One one box resolving %TEMP% will yield the short pathname and on ... There are two "Classes" of environment variables - System and User. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Environment Variables: Short vs Long Pathnames? - "DOCUME~1" vs. "Documents and Settings"
    ... likely disabled on the first machine but not on the second one. ... The system automatically converts the Temp and Tmp variables to short filenames unless Short Filename Generation is disabled. ... I have two Windows XP boxes. ... One one box resolving %TEMP% will yield the short pathname and on the ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Environment Variables: Short vs Long Pathnames? - "DOCUME~1" vs. "Documents and Settings"
    ... The Short File Name Generation is most likely disabled on the first machine but not on the second one. ... The system automatically converts the Temp and Tmp variables to short filenames unless Short Filename Generation is disabled. ... I have two Windows XP boxes. ... One one box resolving %TEMP% will yield the short pathname and on the ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Env Vars: "DOCUME~1" vs. "Documents and Settings"
    ... I have two Windows XP boxes. ... On both machines the settings for the environment variable %TEMP% ... Environment Variables. ...
    (microsoft.public.windowsxp.help_and_support)