locked
%LOCALAPPDATA% randomly created on the desktop RRS feed

  • Question

  • Can anyone point me in the direction to look at log files etc for a problem experienced weekly.

    We have calls logged by users about some issues with programs not working.  The programs that stop working are AppV programs.

    What happens when AppV stops working is that we find out that the %LOCALAPPDATA% variable doesn't exist under the login.  If you command line echo %LOCALAPPDATA% you would expect the response C:\Users\Username\AppData\Local.  However, the variable doesn't exist.  Additionally what we find is that there is a folder labelled %LOCALAPPDATA% on the desktop.

    The only way to then reinstate the %LOCALAPPDATA% variable is to recreate the user profile.  This will fix the problem for that user for a while, a month, 2 months or even 6 months.

    I don't think the problem is related to AppV, its just that AppV relies on the variable %LOCALAPPDATA% being available.

    Where do I start investigating? Any help appreciated.

    • Edited by CraigTT Tuesday, February 16, 2016 10:29 AM
    Tuesday, February 16, 2016 10:27 AM

Answers

  • Hi CraigTT,

    Were there any error messages recorded in the Event Viewer when the issue occurred?

    First of all, please confirm whether %LOCALAPPDATA% folder exists in C:\UsersUsername\AppData\Local.
    Then, we could follow LomM’s suggestion to manually check and set registry key to have a test. set localappdata’s value data to “C:\UsersUsername\AppData\Local”(Path:HKEY_CURRENT_USER\Volatile Environment)
    Since the variable doesn't exist, we could manually set variable in elevated command prompt, type and enter setx localappdata C:\UsersUsername\AppData\Local.

    Best regards.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, February 18, 2016 2:01 AM

All replies

  • Hello,

    If you check the users: HKEY_CURRENT_USER\Volatile Environment -registry can you see where the %LOCALAPPDATA% is pointing?

    Also if you use the "C:\WINDOWS\system32\setx.exe" -command line tool can you then modify the value so that it will point to right location?

    How ever what makes the change is harder to say :|

    Tuesday, February 16, 2016 11:06 AM
  • Hi CraigTT,

    Were there any error messages recorded in the Event Viewer when the issue occurred?

    First of all, please confirm whether %LOCALAPPDATA% folder exists in C:\UsersUsername\AppData\Local.
    Then, we could follow LomM’s suggestion to manually check and set registry key to have a test. set localappdata’s value data to “C:\UsersUsername\AppData\Local”(Path:HKEY_CURRENT_USER\Volatile Environment)
    Since the variable doesn't exist, we could manually set variable in elevated command prompt, type and enter setx localappdata C:\UsersUsername\AppData\Local.

    Best regards.

    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, February 18, 2016 2:01 AM