Ошибка could not get temp directory

В ферме RDS с использованием дисков профилей (User Profile Disks) возникает проблема с установкой плагинов в браузере Google Chrome:

«COULD_NOT_GET_TEMP_DIRECTORY»

Решение:

1. Создаем папку вида C:tempusername

2. Меняем пользовательские переменные среды для TMP и TEMP — напрявляем их в папку из п.1

изначально они имеют вид:

меняем на:

(возможно, пользователю на время придется дать права локального администратора)

3. Перелогиниваемся на тот же терминальный сервер

4. Успешно устанавливаем плагин

5. Затем можно все возвращать назад:
-меняем переменные среды на изначальное значение вида %userprofile%appdatalocaltemp
-удаляем созданную ранее папку C:tempusername

Table Of Contents

  1. Symptom
  2. Solution

Symptom

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

COULD NOT GET TEMP DIRECTORY

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:

  1. For each user who logs in to create a personal folder in the C: TEMP folder
  2. 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.



You’re here because you or your users are receiving the error «Could Not Get Temp Directory» when you try and install a Chrome Extension within their RDP session that uses UPDs (User Profile Disks).

This happens from my research because the Chrome installation process doesn’t recognise the UPD mounted user volume as a valid local disk because there is no drive letter associate with it.

So how do you fix it? The best method I’ve found is to utilise a local TEMP folder with a sub-directory for each user that is created temporarily on each of the session hosts and change the Environment Variables for the TEMP and TMP folders to point to this location. In my case I created a C:Temp folder with permissions set for Domain Users to be able to modify content.

I created a GPO with the following settings and applied it to the users OU:

Then edit your newly created GPO and create two new Environment Variables by right clicking User Configuration > Preferences > Environment and selecting New > Environment Variable then apply the settings outlined below:

As an additional setting, ensure you add an Item-level Targeting option that only applies this GPO to the RDP session hosts. There is no need to apply this to all machines on the network.

Now we’re going to ensure the folders are created when the users log onto the RDP server. Follow the instructions on the screen shot below:

You’ve now complete the GPO portion of the setup. Now log onto your session host servers and apply the GPO via the command line by using:

gpupdate /force

For this to be applied to each user, they need to log off their RDP session properly, not just disconnect their session. Then log back on and now they should be able to install Chrome Extensions without issue.

If you’ve found this useful, you may want to sign up to our newsletter where you’ll receive notices on when we post new articles and helpful «how tos». Just fill out your details below and we’ll do the rest…

Google Chrome Help

Sign in

Google Help

  • Help Center
  • Community
  • Google Chrome
  • Privacy Policy
  • Terms of Service
  • Submit feedback

Send feedback on…

This help content & information

General Help Center experience

  • Help Center
  • Community

Google Chrome

  • Remove From My Forums
  • Вопрос

  • Добрый день.

    Необходимо ставить расширения в браузере хрома на терминальных серверах пользователей.

    Проблема при установке, у пользователей неперемещаемые профиля, установка ни политиками, ни вручную не происходит.

    Проблема в преобразовании абсолютного и относительного пути. Данной проблемы уже много лет. Единственное решение -изменить переменные среды, пример статьи

    https://www.brankovucinec.com/users-cant-install-google-chrome-extensions-on-rds-farm/

    Но изменяются переменные temp И tmp, и такое решение нас не устраивает, через импорт экспорт расширения тоже пробовал, не работает такой вариант в некоторые расширениях.

    Есть еще варианты установки расширения хрома пользователю в автоматическом режиме?

    • Изменен тип

      4 августа 2021 г. 13:45
      Вопрос

Like this post? Please share to your friends:
  • Ошибка could not find zone
  • Ошибка could not find steam api dll
  • Ошибка could not find opengl
  • Ошибка could not find any compatible direct3d
  • Ошибка could not establish connection to steam servers