none
Invalid/Legacy User TEMP Environment Variables

    Question

  • I created a domain user account on 8.1 enterprise. The profile folder is in the usual format 'user.DOMAIN'.

    User environment variables were configured automatically:

    TEMP %USERPROFILE%\AppData\Local\Temp

    TMP %USERPROFILE%\AppData\Local\Temp

    %USERPROFILE% returns the correct path:

    C:\Users\dnadle.OFFICE>echo %USERPROFILE%
    C:\Users\dnadle.OFFICE

    However, %TEMP% and %TMP% are inserting the legacy 8.3 folder name and the resulting path is invalid for some applications. In particular I am having a problem with ActiveState perl and File:Spec.

    C:\Users\dnadle.OFFICE>echo %TEMP%
    C:\Users\DNADLE~1.OFF\AppData\Local\Temp

    C:\Users\dnadle.OFFICE>echo %TMP%
    C:\Users\DNADLE~1.OFF\AppData\Local\Temp

    Obviously I can work around it by replacing %USERPROFILE% the environment variables, but I'm wondering if this behavior is by design.

    Friday, February 07, 2014 3:09 PM

Answers

  • Hi,

    Please understand that the short file name is designed by default in Windows  system, the shorten rule, you can refer to this link:

    How Windows Generates 8.3 File Names from Long File Names

    http://support.microsoft.com/kb/142982/en-us

    Since the ActiveState perl tool does not depend on Microsoft Windows, you should contact its support to know whether or how it can identify the short file name.

    Support & Services Overview

    http://www.activestate.com/support

    Thanks for your understanding.  


    Kate Li
    TechNet Community Support

    • Marked as answer by David Nadle Tuesday, February 11, 2014 4:18 PM
    Tuesday, February 11, 2014 3:25 AM

All replies

  • Actually, the workaround doesn't work. I explicitly set the User TEMP environment variable to:

    C:\Users\dnadle.OFFICE\AppData\Local\Temp

    and restarted the machine. Echoing %TEMP% still returns the legacy name for the folder:

    C:\Users\dnadle.OFFICE>echo %TEMP%
    C:\Users\DNADLE~1.OFF\AppData\Local\Temp

    Friday, February 07, 2014 3:21 PM
  • I have to take one thing back, there is no incompatibility with perl and File:Spec that I could find. I misinterpreted the error.

    However, the expansion of %TEMP% and %TMP% is different than Windows 7; I wouldn't expect 8.1 to revert to legacy 8.3 components of paths.

     

    Friday, February 07, 2014 6:06 PM
  • Hi,

    Please understand that the short file name is designed by default in Windows  system, the shorten rule, you can refer to this link:

    How Windows Generates 8.3 File Names from Long File Names

    http://support.microsoft.com/kb/142982/en-us

    Since the ActiveState perl tool does not depend on Microsoft Windows, you should contact its support to know whether or how it can identify the short file name.

    Support & Services Overview

    http://www.activestate.com/support

    Thanks for your understanding.  


    Kate Li
    TechNet Community Support

    • Marked as answer by David Nadle Tuesday, February 11, 2014 4:18 PM
    Tuesday, February 11, 2014 3:25 AM