Удаленное управление сеансом пользователя windows стандартными средствами
Если Вам необходимо управлять одним из компьютеров удаленно, и при этом взаимодействовать с текущим пользователем, но при запуске например TeamViewer’а нагрузка процессора поднимается до 98% и компьютер начинает заметно тормозить, то Вы можете попробовал стандартный RDP. При его использовании произойдет «выход из системы» текущего пользователя и для последующего входа локально придется вводить пароль. Выход из сложившейся ситуации нам поможет найти стандартная команда shadow.
Наблюдать за другим сеансом служб удаленных рабочих столов.
/SERVER: Сервер терминалов (по умолчанию текущий).
/V Отображение информации о выполненных действиях.
Тогда получается что запускается всего 2 процесса.
Для того что бы все это работало нам необходимо сначала включить RemoteRPC, например через реестр:
После этого можно будет через Диспетчер служб удаленных рабочих столов посмотреть какие пользователи залогинены на компьютере, какие у них id и какие процессы запущены (жаль только названия, нет информации о нагрузке).
По умолчанию пользователю будет задаваться вопрос с разрешением управления, можно отключить вопрос или сделать только удаленное наблюдение, меняется через реестр:
По умолчания этой строчки вообще нет и её нужно будет создавать.
Так же можно включить через групповые политики локальные или доменные. Для включения локально запускаем gpedit.msc — выбираем административные шаблоны — добавление и удаление шаблонов, добавляем System.adm из папки WINDOWS\inf
Теперь настраиваем: конфигурация компьютера — административные шаблоны — компоненты windows — службы терминалов — устанавливает правила для удаленного управления. Для windows xp.
И конфигурация компьютера — административные шаблоны — компоненты windows- службы удаленных рабочих столов – узел сеансов удаленных рабочих столов – подключения – устанавливает правила удаленного управления для пользовательских сеансов служб удаленных рабочих столов. Для windows 7.
Все это работает и в домене, если у пользователя есть соответствующие права.
Если рассматривать терминальный сервер, то там через свойства RDP(через конфигурация узла сеансов удаленных рабочих столов) можно выставить любому пользователю права на удаленное управление,
и отдельно настроить взаимодействие или управление удаленным сеансом.
Удаленное управление сеансом пользователя windows стандартными средствами
Однажды мне захотелось управлять одним из домашних компьютеров удаленно, но при этом взаимодействовать с текущим пользователем, но компьютер был довольно слабый и при запуске например TeamViewer’а нагрузка процессора поднималась до 98% и компьютер начинал заметно тормозить. Попробовал стандартный RDP, но тогда «выбивался» текущий пользователь и для входа локально приходилось набивать пароль. Но чуть позже мне случайно попалась команда shadow.
Наблюдать за другим сеансом служб удаленных рабочих столов. SHADOW < | >[/SERVER: ] [/V] Имя сеанса. Идентификатор сеанса. /SERVER: Сервер терминалов (по умолчанию текущий). /V Отображение информации о выполненных действиях.
Тогда получается что запускается всего 2 процесса.
Для того что бы все это работало нам необходимо сначала включить RemoteRPC, например через реестр:
После этого можно будет через Диспетчер служб удаленных рабочих столов посмотреть какие пользователи залогинены на компьютере, какие у них id и какие процессы запущены (жаль только названия, нет информации о нагрузке).
По умолчанию пользователю будет задаваться вопрос с разрешением управления, можно отключить вопрос или сделать только удаленное наблюдение, меняется через реестр:
По умолчания этой строчки вообще нет и её нужно будет создавать.
Так же можно включить через групповые политики локальные или доменные. Для включения локально запускаем gpedit.msc — выбираем административные шаблоны — добавление и удаление шаблонов, добавляем System.adm из папки WINDOWS\inf
Теперь настраиваем: конфигурация компьютера — административные шаблоны — компоненты windows — службы терминалов — устанавливает правила для удаленного управления. Для windows xp.
И конфигурация компьютера — административные шаблоны — компоненты windows- службы удаленных рабочих столов – узел сеансов удаленных рабочих столов – подключения – устанавливает правила удаленного управления для пользовательских сеансов служб удаленных рабочих столов. Для windows 7. Все это работает и в домене, если у пользователя есть соответствующие права.
В доменных настройках профиля пользователя тоже есть настройка подобных прав (я встречал эти настройки даже в домене win 2000)
Если рассматривать терминальный сервер, то там через свойства RDP(через конфигурация узла сеансов удаленных рабочих столов) можно выставить любому пользователю права на удаленное управление,
и отдельно настроить взаимодействие или управление удаленным сеансом.
Для удобства можно подключаться через диспетчер задач
Удаленный рабочий стол – произошла внутренняя ошибка
Иногда при попытки подключиться к удаленному рабочему столу, пользователи могут столкнуться с ошибкой. Описание ошибки, ясности не дает. “Произошла внутренняя ошибка” что это и как от нее избавиться – постараемся ответить в этой статье.
Причины появления окна “Произошла внутренняя ошибка” могут быть совершенно различным, и могу быть как с сервером Remote Desktop, так и с клиентом.
UPD (01.05.2020): В первую очередь попробуйте перезапустить службу удаленных рабочих столов на сервере. Если это не поможет :
Одним из способов решить данную проблему это очистка историю RDP подключений на клиенте в ветке HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers Так же может помочь сброс кеша RDP в каталоге C:\Users\%Username%\AppData\Local\Microsoft\Terminal Server Client\Cache (перед очисткой завершите все запущенные сеансы mstsc.exe). Для очистки кеша используйте команду:
del «C:\Users\%Username%\AppData\Local\Microsoft\Terminal Server Client\cache» (не забудьте указать корректный путь)
Одной из возможных причин возникновения данной ошибки, могут быть множественные попытки несанкционированного доступа. Иными словами, если ваш RDP сервер доступен для всего интернета по стандартному порту 3389 – велика вероятность, что вас пытаются взломать. Косвенным признаком, что “Внутренняя ошибка” происходит именно по причине ломящихся снаружи – в журнале (о том как открыть журнал – в конце статьи) RDP подключений будут ошибки с кодом 1006 “Сервер узлов сеансов удаленных рабочих столов получил большое количество незавершенных подключений. Возможно, система атакована.”
Решений тут несколько:
Как изменить RDP Порт
В интернете можно встретить и другие варианты решений, какие подойдут именно вам – надо проверять.
Пользователи windows 10 иногда сталкиваются с “Внутренней ошибкой” при подключении к RDP еще и из-за обновлений безопасности. В редких случаях, вместо ошибки “Ошибка RDP подключения CredSSP encryption oracle remediation” – пользователи могут получать “внутренняя ошибка подключения”. Если ни один из приведенных выше способов не помог – попробуйте решения описанные в статье RPD: ошибка подключения CredSSP encryption oracle remediation
Открыть журнала событий RDP
Откройте меню пуск и в строке поиска введите “Просмотр событий” (англ. Event Viewer). В нем Журналы приложений и служб > Microsoft > Windows > TerminalServices-RemoteConnectionManager
По работе возникает необходимость использовать раб комп из дома удалённо. Т.к. наличие на раб компе белого ip позволяет использовать RDP, то его и пользую.
Всё устраивает, кроме 1. Периодически, если свернуть окно с RDP, а потом развернуть, то окно зависает. Т.е. удалённый комп как бы не реагирует. Решается всё простым перезаходом. Закрываю зависшее окно, коннекчусь заново и всё ок. Это немного напрягает.
С удалённым компом всё ок, не виснет. Как при непосредственной работой за ним, так и после перезахода RDP. Винда и там и там 10 pro x64. Интернет отличный и дома, и на работе. Возникают мысли снести винду на рабочем, но лениво.
P.S. понимаю, что пост сейчас заминусят, но вдруг кто-нибудь сталкивался с подобной проблемой и подскажет, куда копать. Всем спасибо!
Дубликаты не найдены
Используй TCP подключение, а не UDP
так rdp Это как бы tcp по udp Не работает
Отключите UDP и оставьте соединение только по TCP.
От имени администратора откройте консоль CMD и в ней выполните команду:
1) микрообрывы связи (у провайдера, сами роутеры глючат, проходят атаки на роутеры и прочее, плюс сама винда или антивирус может дропать соединение). Попробуйте перегрузить сначала один, затем если не поможет другой роутер, проанализируйте после перезагрузки какого баг пропадает и раскручивайте проблему с той стороны;
@iffann, спасибо за совет. Но ведь отключение всего этого просто приведёт к более меньшему потреблению трафика, если я правильно понимаю. Дома 80мбит/c, на работе 0,5гбит/c. я думаю отключение рюшечек не поможет.
а вот про «голый рдп» не совсем понял. Можете поподробнее, пожалуйста.
скорее всего срабатывает таймаут по неактивности пользователя. копай в эту сторону. имхо. может на сервере, может у тебя, может оба варианта.
Тогда рубило бы сессию. Уход домашнего компа в спящий режим тоже глубоко фиолетов.
Может засыпает наглухо рабочий комп?
Еще как вариант надо все виды сна отключить, а то бывало пк уходил в «полусон», он конечно от первого же пакета просыпался, но пару секунд на это тратил
Отрабатывает тайм-аут соединения скорее асего. Сидеть голым задом читай Белый адрес да в rdp, да вы чертовски рисковый.
Обожаю эти многоуровневые подключения
Проспал, работаю сегодня из дома.
По RDP подключился к своему рабочему компу
Оттуда по RDP на сервер клиента
Оттуда по VNC на комп клиента
И там открыл TeamViewer, чтобы спец из другой фирмы мог творить там свои грязные сисадминские дела.
Запасаемся попкорном или CVE-2019-0708
Стало известно об опасной уязвимости в протоколе RDP: корпорация Microsoft подготовила экстренный патч для уязвимости с идентификатором CVE-2019-0708, позволяющей выполнить произвольный код на целевой системе.
Уязвимость удаленного выполнения кода существует в службах удаленных рабочих столов (ранее они назывались службами терминалов), когда злоумышленник, не прошедший проверку подлинности, подключается к целевой системе с помощью RDP и отправляет специально созданные запросы. Эта уязвимость использует предаутентификацию и не требует взаимодействия с пользователем. Злоумышленник, успешно воспользовавшийся данной уязвимостью, может выполнить произвольный код в целевой системе.
The vulnerability (CVE-2019-0708) resides in the “remote desktop services” component built into supported versions of Windows, including Windows 7, Windows Server 2008 R2, and Windows Server 2008. It also is present in computers powered by Windows XP and Windows 2003, operating systems for which Microsoft long ago stopped shipping security updates.
Чтобы воспользоваться уязвимостью, злоумышленнику необходимо отправить специально созданный запрос службе удаленных рабочих столов целевых систем через RDP.
Интересным является тот факт, что эту или схожую уязвимость продавали в «даркнете» как минимум с сентября прошлого года:
description: This is a bug in RDP protocol. That means you may exploit any Windows remotely who enables RDP.
vulnerability type: Heap overflow
affected versions: Windows 2000/XP/2003/Vista/7/2008(R2)
privilege level obtained: SYSTEM privilege
reliability: 90% for one core / 30% for multiple core
exploitation length: around 10 seconds
Possible buyer, [30.09.18 12:58] affected versions: Windows 2000/XP/2003/Vista/7/2008(R2) LOL
Possible buyer, [30.09.18 12:58] is it pre-auth or post-auth vuln?
SELLER, [30.09.18 12:59] Pre
Possible buyer, [30.09.18 12:59] for how much they/he/she sells it?
SELLER, [30.09.18 12:59] 500
SELLER, [30.09.18 12:59] Shared
Possible buyer, [30.09.18 12:59] 500k USD?
SELLER, [30.09.18 13:00] So u can guess it was sold few times
This vulnerability is pre-authentication and requires no user interaction. In other words, the vulnerability is ‘wormable’, meaning that any future malware that exploits this vulnerability could propagate from vulnerable computer to vulnerable computer in a similar way as the WannaCry malware spread across the globe in 2017.
The relevant configuration options for terminal servers, terminal server sessions, users, and clients can be found in different places in the registry. The administration tools and Group Policies, described in the previous chapters, usually change several registry values. The following section provides you with information on their paths and default values.
This section is a general overview of those registry keys that are essential for Terminal Services. A full documentation of all relevant keys would probably be a book in its own right. However, if you know where to find the “interesting” locations, there is nothing to prevent you from doing your own experiments on a test system. Experiments have produced many tips for optimizing system performance by modifying the registry, just as described in this book.
General Settings
We will first examine those areas of the registry that are vital to the global configuration of the terminal server and its sessions. These areas are located in the HKLM root hive.
One of the central HKLM root hive areas can be found under SYSTEM\CurrentControlSet and SYSTEM\ControlSet00 n. The numbered ControlSet001 and ControlSet002 subkeys contain control information that is needed to start and keep Windows Server 2003 running. One of these two numbered subkeys is the original; the other is the backup copy. On startup, the system determines which one of the keys is the original and saves the result under HKLM\SYSTEM\Select. The last successful set of control information is saved in HKLM\SYSTEM\CurrentControlSet. The three sets of control information are for the most part identical, but only one is valid and used by the system.
In the following, we assume that ControlSet001 contains the valid control information used by the system. On your system, it could be ControlSet002.
The HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server hive allows you to configure general settings, just as you can under Terminal Services configuration or Group Policies. Some of the values described here will be discussed in detail later in this chapter.
Table 6.2: Registry Values in the HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server Hive
Data Type, Default Value
Deletes temporary session directories when the user logs off. Possible values are 0 or 1. Change this value using the Delete temporary directories on exit server setting in Terminal Services configuration.
Disables or enables remote assistance on this computer. Possible values are 0 or 1. Usually, this setting is established in the Remote tab of the Control Panel’s system properties.
Allows or denies connecting to Terminal Services. Possible values are 0 or 1.
Default value of the compatibility flag for applications. (See “Compatibility Flags” section later in this chapter.)
Each user can be limited to one session to save server resources or facilitate session recovery. Possible values are 0 or 1. Change this value using the Restrict each user to one session server setting in Terminal Services configuration.
Allows write-protection of the Permissions tab in the Terminal Services configuration RDP connection settings. Possible values are 0 or 1.
Sessions started in the background are assigned to new users. The default value for this setting is 0. For application servers, you can select different values, which might reduce login times for new user sessions.
Modems With Bad DSR
List of modems that have a problem with Data Set Ready (DSR).
Default value of the compatibility flag for applications. (See “Compatibility Flags” section later in this chapter.)
Default value of the compatibility flag for applications. (See “Compatibility Flags” section later in this chapter.)
Each user session receives its own temporary directory. Possible values for this setting are 0 or 1. Change this value using the Use per session directory server setting in Terminal Services configuration.
Version number of the terminal server.
Indicates whether the session directory for this server is active. Possible values for this setting are 0 or 1.
Class ID, needed by the session directory.
Another class ID that the session directory needs.
Indicates whether the server’s IP address is exposed with the activated session directory. Possible values for this setting are 0 or 1.
Indicates whether the server advertises itself as the terminal server. Possible values are 0 or 1.
Indicates whether the system is running in application compatibility mode. Possible values are 0 or 1.
Indicates whether basic Terminal Services functions are enabled. Possible values are 0 or 1.
Indicates whether users can log on to the terminal server. Possible values are 0 or 1.
In addition to individual values, this path holds several subkeys that, in turn, contain keys and values for Terminal Services configuration.
Log and User Session Settings
In Table 6.3, the last elements listed are the Wds and WinStations keys. They play a key role in configuring the RDP protocol and user sessions. Because some keys might exist in several hives, they should be explained in more detail. It is impossible to list and explain all keys in this book, so the following tables show only a selection of the most important configuration options. They can be found in one or more of these registry hives:
HKLM\SYSTEM\ControlSet001\Control\Terminal Server \WinStation\RDP-Tcp.
The values here are changed through the tool Terminal Services Configuration.
Table 6.3: The Most Important Subkeys in the HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server Registry Hive
Configuration of the redirection of clipboard and client ports (redirector)
Option to configure a list of applications that can be run on the terminal server
Configuration of the session directory
All default Terminal Services configuration settings, for example, automatic logon data, time limits, initial program, etc.
Adjusts DOS shell concerning query of keyboard events
Adjusts keyboard driver for unusual shortcuts or special hardware
A list of system programs that run in the system context (0) or in the user context (1)
Adjusts the specific commands for the prompt: Change logon, Change port, Change user, Change winsta, Query appserver, Query process, Query session, Query user, Query winsta, Reset session, and Reset winsta
Device paths for graphics redirection
Configuration of TCP/IP log settings, for example, delays, buffer attributes, port number, service name, and so on
Specific configuration for each type of connection and the console session
Table 6.4 lists the so-called flags. Flags are binary values that make a statement true (1) or false (0).
Table 6.4: List of Flags Under HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server \Wds and \WinStations Data Type
Value Names ( DWORD)
Connect to client drives upon logon.
Connect to client printers upon logon.
Disable client audio mapping.
Disable client COM port mapping.
Disable client drive mapping.
Disable clipboard mapping.
Disable Windows client printer mapping.
Disable program start upon connection.
Disable use of printers.
Enable remote user sessions.
Use client main printer by default.
Inherit the setting on the terminal server to reset the connection when the connection was ended from another source.
Inherit the setting on the terminal server to use the client’s logon information for automatic logon from another source.
Inherit the setting on the terminal server that a modem calls back from another source.
Inherit on the terminal server the phone number for modem callback from another source.
Inherit the setting on the terminal server for color depth from another source.
Inherit the setting on the terminal server to start an initial program upon logon from another source.
Inherit on the terminal server the maximum time after which disconnected sessions are ended from another source.
Inherit on the terminal server the maximum idle time for user sessions from another source.
Inherit on the terminal server the maximum session time from another source.
Inherit the setting on the terminal server whether a new connection can be made only from the same client from another source.
Inherit the setting on the terminal server, whether the session is ended upon reaching a session limit or upon disconnection from another source. If you do not set this flag, the session will be simply disconnected.
Inherit the security setting on the terminal server.
Inherit the setting on the terminal server for remote control from another source.
Selecting this flag disables logon.
Makes entering a password obligatory.
You can reconnect from the same client only as you did previously. This value becomes effective only if you set the fInheritReconnectSame flag.
The session ends when a session limit is reached or the connection is broken. If this flag is not set, the session is simply disconnected. This value becomes effective only if you set the fInheritResetBroken flag.
Always use the default Windows component to authenticate users.
Table 6.5 lists the most important keys with the REG_DWORD data type. These are often directly related to one of the flags listed in the preceding table.
Table 6.5: The Most Important Keys of the REG_DWORD under HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server\Wds and \WinStations Data Type
Set modem callback. This value becomes effective only if you set the fInheritCallback flag to 0.
Default color-depth setting.
Support options for graphics elements output with GDI+.
Input buffer length for the RDP connection in bytes. Default value is 2048.
Set keyboard layout.
Maximum session time in seconds. This value becomes effective only if you set the fInheritMaxSessionTime flag to 0.
Maximum time in seconds after which disconnected sessions are ended. This value becomes effective only if you set the fInheritMaxDisconnectionTime flag to 0.
Maximum idle time in seconds for user sessions. This value becomes effective only if you set the fInheritMaxIdleTime flag to 0.
Set the minimum value of encryption level.
Maximum waiting time in milliseconds until the output buffer for the RDP connection is emptied.
Output buffer length for the RDP connection in bytes.
Port for network communication using the RDP protocol. Default value is 3398.
Remote control configuration. This value becomes effective only if you set the fInheritShadow flag to 0. 0: Deny remote control. 1: Obtain user permission and interact with the session. 2: Do not obtain user permission and interact with the session. 3: Obtain user permission and display session. 4: Do not obtain user permission and display session.
Finally, Table 6.6 shows the most important keys of the REG_SZ data type.
Table 6.6: The Most Important Keys of the REG_SZ under HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server\Wds and \ WinStations Data Type
Set a phone number for modem callback. This value becomes effective only if you set the fInheritCallbackNumber flag to 0.
Comment string in the administration tool.
Set a default domain name on logon of a user session.
Initial program that is started when a user logs on. This value becomes effective only if you set the fInheritInitialProgram flag.
Set a NetWare logon server.
Set a default password when logging on to a user session. The password is encrypted and saved here.
Set a default user name for logon to a user session.
Working directory that is set on user logon and initial start of an application.
Drivers and Services
The HKLM\SYSTEM\ControlSet001\Services\TermDD hive contains the attributes of the Termdd.sys terminal device driver. However, do not change these attributes. You can find the device driver’s path and start option here.
An adjoining hive, called HKLM\SYSTEM\ControlSet001\Services\TermService, hosts both the configuration of Terminal Services within the generic Svchost.exe Windows service and of the Services.exe process. The keys you find there include, for example, the display name, description, complete path, or start options as also listed under services administration. The subkeys show license settings and parameters for the performance indicator object of the system monitor.
The UseLicenseServer key under \Parameters is used by Windows NT 4.0, Terminal Server Edition. Windows Server 2003 no longer needs this key. It remains in the registry for compatibility reasons only.
Logon
If you log registry access in a focused manner during logon of a user session, you will gain interesting insights into the corresponding initialization processes. For example, which areas relevant for terminal servers does the Winlogon.exe logon process access?
One piece of information needed during logon concerns creating or loading the user profile. HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. These keys contain the default paths for a default user (DefaultUser), general user (AllUsers), and individual user profiles. Furthermore, you can find a list of all users who have logged on to the system here. If a user logs on to the terminal server for the first time, he or she inherits both the normal default user settings and the default values for the terminal server session. They are saved under HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server\DefaultUserConfiguration.
Another relevant area is located under HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon. It includes the AppSetup key that defines a special script file called UsrLogon.cmd. This script file is executed along with a possible logon script on startup of each terminal server session. (See Chapter 7.) The same location also contains the WinStationDisabled key that either denies (0) or allows (1) new terminal server users to log on, regardless of the protocol. At the prompt, you can modify this value using the Change logon /enable or Change logon /disable prompts.
The HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify\termsrv area is also needed for logon. It defines a specific logic as a response to system events.
When a user logs on, even driver configuration is accessed. The area reserved for terminal servers is located under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32\Terminal Server\RDP. The video driver configuration plays a certain role for the user session, too. For instance, Explorer.exe needs the corresponding data that is located here: HKLM\SYSTEM\ControlSet001HKLM\SYSTEM\ControlSet001\Control\Terminal Server\VIDEO\rdpdd under the \Device\Video0 key.
If local Group Policies for Terminal Services settings were established, these must be loaded at the right time, of course. This happens during logon with keys found under HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services and the EnableAdminTSRemote key under HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer. However, these areas can be fairly empty if no or just a few local Group Policies were predefined.
Basically, the settings for local Group Policies are located under HKCU\Software\Policies and HKLM\SOFTWARE\Policies. Users have only read-access rights to these two hives. Therefore, Group Policies cannot be modified at the user level.
Printing
Connecting and managing printers for terminal servers is a very complex topic. (See Chapter 4.) This fact is also quite evident in the registry. The general configuration of the printers used and the associated driver information are located under HKLM\System\CurrentControlSet\Control\Print.
You will find references to the currently installed printer drivers of the terminal server under HKLM\SYSTEM\ControlSet001\Control\Print\Environments\WindowsNTx86\Drivers\Version-3\ Printer name>. This correlates with the files under %SystemRoot%\system32\spool\drivers\w32x86\3. The user-specific settings for the printers are located in the registry under HKCU\Printers.
Information for the printer drivers for the Windows Server 2003 64 bit versions is located under HKLM\SYSTEM\ControlSet001\Control\Print \Environments\WindowsIA64\Drivers.
If you do not want to install printer drivers from sources that might not be controllable, you have the option of choosing a binding path. This path is called a trusted printer driver path. To configure this behavior, you need to add the following keys to HKLM\SYSTEM\ControlSet001\Control\Print\Providers\LanManPrintServices\servers:
Name: TrustedDriverPath; type: REG_SZ; value: \\ Server name\Share folder
It is important that the structure of the \\ Server name\Share folder mirror the %SystemRoot%\system32\spool\drivers\w32x86 folder. If all the data was properly entered, printer drivers can be installed only from the predefined source, allowing complete control of the printer drivers used.
User-Specific Configuration
If a user has administrator permissions, there is an additional key called TSADMIN here, containing several subkeys. These subkeys allow access to attributes for connection options, alerts, refresh rates, keyboard shortcuts for remote control, server list options, and display values for system processes in the Task Manager.
After a user session has been established, it has its own ID (SESSIONNAME). It is located next to the client name (CLIENTNAME) and the logon server name (LOGONSERVER) in the HKCU\Volatile Environment section of the registry.
Use the following registry sections to define all relevant user folders in which to save data about the applications, desktop, local settings, personal files, network environment, print environment, or start menu: