%TEMP% is displayed by "LONG NAME" on Command prompt

G

Guest

I am administrating 10 computers, all computers are Windows XP SP1/SP2 Pro.
When I checked %TEMP% output via "SET" command, 2 computers has different
answer.
8 compuetrs are displayed by shortname -> C:\DOCUM~1\Username\LOCALS~1\TEMP
2 computers are displayed by longname -> C:\DOCUMENT AND
SETTINGS\Username\Local Settings\Temp

I checked the settings of User Environment Variables via my computer's
property. but all computers are same settings. -> %USER PROFILE%\Local
Settings\Temp.

How do I set consistent text appearance across all computers ?
 
G

Guest

This isn't an answer, just to confirm and share what I experience.

On my computer, when I type "echo %TEMP%" at the command prompt (cmd.exe) I
recieve the path to the temp directory in the abbreviated "short" form using
~.
I also receive the short form if I use the "set temp" command.

However, if I open system properties, Advanced Tab, Environment Variables
button, I see that the TEMP user variable is indeed stored there using the
long directory name format.

I know the CMD command prompt can and does use the long structure, I am also
confused about why there is a discrepency, and where this 'preference' (I'm
sure) is stored.
 
M

myPC

Open the registry. Look for a DWORD key called NtfsDisable8dot3NameCreation
in HKLM\System\CurrentControlSet\Control\FileSystem. The value must be set
to 1 to Disable8.3 and 0 to use 8.3. If the key does not exist, don't
create it unless you want to disable 8.3.

HTH...
 
G

Guest

myPc, Thank you for your reply.

I had tested your opinion ( 1 of the 8 PCs).
I expect the short- name variables will be changed to long-name.
But the result was same with before.
-----
1. take the before output (SET >before.txt)
2. change registry (0 to 1) and reboot computer
3. run cmd.exe
4. take the after output. (SET >After.txt)
5. Confirm -> All variables are same.
6. Checked the registry to confirm the changed value. -> changed correctly.
-----
 
C

cquirke (MVP Windows shell/user)

Open the registry. Look for a DWORD key called NtfsDisable8dot3NameCreation
in HKLM\System\CurrentControlSet\Control\FileSystem. The value must be set
to 1 to Disable8.3 and 0 to use 8.3. If the key does not exist, don't
create it unless you want to disable 8.3.

I would SOOO not do that :)

Normally, you'd expect both Cmd.exe and Command.com CLIs to work with
LFNs just fine, but I read on an MS blog that if you've done something
during the course of a CLI session that invokes a "DOS" (LFN-unaware)
code thing, then all further LFN display is suppressed.

Let's play with this...
- Start, Run, Cmd
- Set Temp
....hmm, I already get 8.3 names, even tho I haven't invoked any "DOS"
apps as yet. When I do a Set, I get a mix of 8.3 and LFNs.

I suspect it may have to do with what last Set the variable.

It doesn't matter, as long as the correct 8.3 names are under the
LFNs. Some contexts seem to need 8.3 names (e.g. .INF handlers), so
suppressing these in the file system may convert a trivial cosmetic
issue into a system-breaking head-scratcher.


------------ ----- ---- --- -- - - - -
The most accurate diagnostic instrument
in medicine is the Retrospectoscope
 
G

Guest

I am testing some cases.
Normally I am using a domain user.

I created a local user (user name was same as domain user) on the PC.
The OS would create same "Profile name".(It contained "dot" and some ID
information).

The new local user logged on to PC and checked the %TEMP%,
the following was displayed.

C:\DOCUME~1\Username.Identify_Info\Local Settings\Temp

I got a mixed of 8.3 and LFNs.

And, When I used a Domain user and checked it again, the following was
displayed.

C:\DOCUME~1\Username\LOCALS~1\Temp
(SFN. Same with before)
 

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