%USERNAME% Environment Variable for VSCode extension persistence
I am currently in the process of deploying a VDI environment and one of the applications required by the users is VSCode. Due to the VDI's being non-persistent I am attempting to find a method to make the user installed extensions persist after log off. After looking online I found the following link that recommends adding a VSCODE_EXTENSIONS environment variable https://github.com/microsoft/vscode/issues/17691
However when I create the VSCODE_EXTENSIONS environment variable in the following format \<server><share>%USERNAME%.vscode the username variable appears to default to the SYSTEM account. So when I run an echo command I get the following result:
echo VSCODE_EXTENSIONS
\\<server>\<share>\SYSTEM\.vscode
This is preventing me being able to store the VSCode extensions in the users profiles that are stored on a file share. Is there a way to make the variable use the local username so I can direct it to the correct location.