User Variable Temp not truncating to 8.3 properly in command prompt C:\Docume~1\userName\Local Settings\Temp

Answered User Variable Temp not truncating to 8.3 properly in command prompt C:\Docume~1\userName\Local Settings\Temp

  • Tuesday, April 12, 2011 1:51 PM
     
     

    We have a dozen machines that are not truncating the user variable from LFN C:\Documents and Settings\userName\Local Settings\Temp to the proper 8.3 format C:\Docume~1\userName\LocalS~1\Temp. Instead what is happening is a mixed form of LFN and 8.3 C:\Docume~1\userName\Local Settings\Temp.  We have tried changing the registry setting NtfsDisable8dot3NameCreation from 0 to 1 and testing in the command prompt via cd %temp% to see if it has any impact and it did not.

    This is causing problems with a couple of applications that rely on the temp variable, as a workaround we changed the user variable temp to C:\Temp. But I realize this is only a workaround to an underlying issue that really should be corrected.

All Replies

  • Tuesday, April 12, 2011 9:27 PM
     
     

    I believe I have found a solution.

    The ntfsDisable8dot3NameCreation registry exists for the purpose of disabling that feature, which is not what we want to do on a machine running our applications.

    After messing with changing the value from 0 to 1 and back and deleting and creating new profiles and not seeing any impact on the displaying of the %temp% variable in the command prompt I decided to delete the key. After doing so I deleted my profile and logged back in to create the new profile and everything works correctly.

    So what to make of this? Beats me…corrupt key?

  • Wednesday, April 13, 2011 12:41 AM
     
     

    After a profile has been created, the %temp% path is fixed. Deleting the profile IMHO was not necessary, you coud just redefine the temp path in environment of each affected user.

    Morale: don't tamper with default filesystem behavior and don't let others do that. The Great Chairman Mao taught: "deceases are many, but health is only one".

    --pa

     

  • Wednesday, April 13, 2011 1:06 PM
     
     Answered

    After a profile has been created, the %temp% path is fixed. Deleting the profile IMHO was not necessary, you coud just redefine the temp path in environment of each affected user.


    I wish that was the case. But some of the users profiles would not release the old mixed lfn-8.3 temp variable. After the key was deleted, the system rebooted and the user temp variable was set back to %USERPROFILE%\Local Settings\Temp executing cd %temp% would still return C:\Docume~1\userName\Local Settings\Temp. At this point any new profile on the machine would return the correct path C:\Docume~1\userName\LocalS~1\Temp, but NOT the existing profiles, thus my reasoning for deleting and recreating the new user profile.

    • Marked As Answer by Mark Mazour Monday, April 18, 2011 3:17 PM
    •  
  • Wednesday, April 13, 2011 1:32 PM
     
     

    Morale: don't tamper with default filesystem behavior and don't let others do that. 


    Can you elaborate on that? Are you suggesting that I should not have changed the setting of that key? Or not deleted it? Or that it existed in my system and it should not have been there in the first place and it was because someone tampered with the system?

    If a system is not exhibiting the correct behavior/functionality and that functionality is driven/altered by a particular key setting why would changing that key be considered tampering with default file system?

    According to the microsoft documentation ( http://technet.microsoft.com/en-us/library/cc959352.aspx ) the NtfsDisable8dot3NameCreation key is in the system for the sole purpose of changing the behavior of the handling of filenames. When this key is set to 0 and the user temp variable is set to %userprofile%\Local Settings\Temp executing cd %temp% at the command prompt should return an 8.3 path of C:\DOCUME~1\userName\LocalS~1\Temp. Setting it to 1 should result in a LFN path C:\Documents and Settings\userName\Local Settings\Temp. In my systems changing this key did not seem to have any impact and my systems were returning a mix of LFN and 8.3 C:\DOCUME~1\userName\Local Settings\Temp. So deleted it and with that my systems are now exhibiting the correct behavior.

    Please do not mistake my reply as being snarky or rude I am just trying fully understand what is going on with my systems.