Symptom
In this article, I will explain how to resolve the COULD NOT GET TEMP DIRECTORY error simply.

From my research this error appears on RDS (WS2012R2) servers using User Profile Disks (UPD).
This error occurs when a user tries to install an extension on Google Chrome, I first think of a problem of right, with the admin account I got the same message, so I search on Google and I came across this article (in English) which explains why and how to solve it.
I first tested the solution with an account made the changes by hand on the environment variables and I was able to install my Chrome extension.
Solution
First, you must create on each RDS server, a TEMP folder at the root of the C with write / modify rights for everyone.

Then you have to set up a GPO, which does two things:
- For each user who logs in to create a personal folder in the C: TEMP folder
- Modify TEMP and TMP environment variables
There are two settings to apply at the user level.
1 – Creating the personal folder in the TEMP folder:

2 – Modification of environment variables:

All you have to do is close and reopen the sessions to install the Chrome extensions without error.
Ca fonctionne, top 🙂
This is too short, I dont really get what you’re supposed to do. I created folders but nothing happens of course. How do you know whats the username? Why is there a different path on the 2nd and 3rd image? Please help.
Hi,
On the first capture, we create a folder for each user who will connect and on the second capture, we modify the user’s environment variable to change the temporary folder
HI,
can you please create a video tutorial on it. i can’t understand it very well sorry about that.
and there are no complete screen shots of GPOs how can we add environment variables and username etc.