Env Vars: "DOCUME~1" vs. "Documents and Settings"

M

Martin T.

Hello.

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?

cheers,
Martin
 
J

John Wunderlich

Hello.

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?

cheers,
Martin

There are two "Classes" of environment variables - System and User.
You have checked/changed the User "TEMP" environment variable.
What is the System "TEMP" environment variable set to?

R-Click "My Computer" -> Properties -> Advanced Tab ->
Environment Variables (button).

(Double-click on "TEMP" in both User and System windows and see what
you have).

HTH,
John
 
M

Martin T.

John said:
Hello.

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.

There are two "Classes" of environment variables - System and User.
You have checked/changed the User "TEMP" environment variable.
What is the System "TEMP" environment variable set to?

R-Click "My Computer" -> Properties -> Advanced Tab ->
Environment Variables (button).

(Double-click on "TEMP" in both User and System windows and see what
you have).

The System Temp variable is set to its default: %SystemRoot%\TEMP
And %SystemRoot% expands to C:\WINDOWS on both boxes.
I do not think it has anything to do with the System Variable value
anyway, since the User TEMP just overrides the system temp value.

br,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top