How to set default keyboard settings for a user in a Windows remote desktop session.

This problem had me going for a few hours.. Setting the right keyboard, language settings and Internet explorer 11 spell check for a user when he logs on.

Normal behavior is that the RDS ( Citrix ) session inherits the keyboard settings from the client, but what if we don’t (or can’t) control the endpoint device? Or users falling asleep on their keyboard and touching ALT + SHIFT : -).

This is what we wanted:

  1. Ignore the client keyboard settings at all time.
  2. Set the right keyboard layout and default language, characters etc etc.
  3. Set the correct language auto correct in Internet Explorer 11

Note:

This can’t be fixed after the user logon due to the fact that Windows only checks these settings during logon..

This is how we dit it:

  1. Set the key (REG_DWORD) IgnoreRemoteKeyboardLayout to 1 in the HKLM\System\CurrentControlSet\Control\Keyboard Layout\
  1. Create a mandatory profile (there are many how to’s on the web) and adjust the following keys after mounting the MANPROF:

HU\MANPROF\Control Panel\International

I replaced the whole key and subkeys by exporting it from a freshly adjusted user, watch carefully when importing it back again to the man Prof because of the location of the import!

Export : [HKEY_CURRENT_USER\Control Panel\International]

Key1

Key2

[HKEY_USERS\MANDATORY\Control Panel\International]

Key1

Key2

                [HKEY_CURRENT_USER\Control Panel\International\User Profile\nl-NL]

                [HKEY_USERS\MANDATORY\Control Panel\International\User Profile\en-US]

               

Also adjust the following keys and set a list of the keyboards you want to add, in my case it was dutch with a us int keyboard.

(For a list of the available keyboards check your RDS server: HKEY Local Machine\System\CurrentControlSet\Control\Keyboard Layouts\)

HU\MANPROF\Keyboard Layout\Preload\

Type: REG_SZ

Name: 1

Value: 00000413

HU\MANPROF\Keyboard Layout\Substitutes\

Type: REG_SZ

Name: 00000413

Value: 00020409

  1. This should be fixed by step 1 and 2. When my users log on they get the Dutch language with an US International keyboard and the spell check is set to Dutch in IE11.

And.. Maybe you want to delete the keys in HU\MANPROF\Keyboard Layout\Toggle\ for the users who fall alsleep : )

last note: GPP did not do the trick…

Advertisements

How to get rid of Personalize and screen resolution in the context menu when you right click the desktop

The powershell script in this article will delete personalize and screen resolution on the context menu(right mouseclick on desktop). this is usefull for VDI or RDS environments. It is only working with software deployment or task sequence deployment in SCCM, because it is designed to run with system account privileges.

Download the word file copy the text to notepad and save the file as <yourname>.ps1

Deletecontextmenuitems

Noscreenresolutionandpersonalize

 

Save File Explorer View settings on Windows 8.1/S2012R2 with RES Workspace manager zero profile

If you want to save the Explorer view settings add the following to zero profile settings to remember:

registry section

HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell

Tip. Use the tool ShellBagsView to view the folder settings in registry.

If you like to set the default folder view settings use the following registry keys:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults  value:{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7} HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams value:settings

solution: downloading or opening PDF not working and encrypted pages cant open or save files.

In an customer environment there were issues with opening PDF files on a HTTPS page. Downloading – save as didnt work either.

After investigation my KPN Consulting collegue Tim Nieuwenhuys has found the solution:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

 

“DisableCachingOfSSLPages”=dword:00000000

 

See also Ingmar Verheij blog post and Microsoft Article. This solution also helps when you want to open or save files like PDF or WORD files and you are confronted with Default_aspx.
Thank you Tim 🙂

PVS TargetOSOptimizer

Run Target OS Optimizer before capturing vDisk.

C:\Program Files\Citrix\Provisioning Services\TargetOSOptimizer.exe

 

Regfile contains:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Citrix\ProvisioningServices]
“DeviceOptimizerRun”=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache]
“Enabled”=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]
“AUOptions”=dword:00000001
“ScheduledInstallDay”=dword:00000000
“ScheduledInstallTime”=dword:00000003
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv]
“Start”=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction]
“Enable”=”N”
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OptimalLayout]
“EnableAutoLayout”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
“NtfsDisableLastAccessUpdate”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power]
“HibernateEnabled”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]
“CrashDumpEnabled”=dword:00000000
“LogEvent”=dword:00000000
“SendAlert”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\cisvc]
“Start”=dword:00000004
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
“NoRecycleFiles”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application]
“MaxSize”=dword:00010000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security]
“MaxSize”=dword:00010000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\System]
“MaxSize”=dword:00010000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content]
“CacheLimit”=dword:00000400
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Content]
“CacheLimit”=dword:00000400
[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content]
“CacheLimit”=dword:00000400
[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Content]
“CacheLimit”=dword:00000400
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths]
“Paths”=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path1]
“CacheLimit”=dword:00000100
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path2]
“CacheLimit”=dword:00000100
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path3]
“CacheLimit”=dword:00000100
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths\path4]
“CacheLimit”=dword:00000100
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
“ClearPageFileAtShutdown”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
“DisablePasswordChange”=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysMain]
“Start”=dword:00000004
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend]
“Start”=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
“Windows Defender”=hex(2):00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WSearch]
“Start”=dword:00000004

Edit Hkey_Current_User keys

Create te following steps for editing the Hkey_current_user. For example, this could be used in a Task Sequence in Config Manager.

User is not logged on to the client:

Load Hive
reg.exe load HKU\temphive c:\users\\ntuser.dat
Edit Registry
reg.exe add “HKU\temphive\Control Panel\Desktop” /v ScreenSaveActive /t REG_SZ /d 0 /f
Unload Hive
reg.exe unload HKU\temphive

User is logged on to the client

Use PSGETSID.EXE from sysinternals suite.

Script:

echo off

:: ——–
:: Turn off Echo

:: Variabable “uSID” to store UserSID
set uSID=

::Get SID and store in uSID
for /F “usebackq delims== skip=1” %%i in (`psgetsid.exe -accepteula User`) do set uSID=%%i

:: SID to screen
echo uSID=%uSID%

:: Set registry path to _key
set _KEY= HKU\%uSID%\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current
echo _KEY=%_KEY%

:: Delete default value
Reg delete “%_KEY%” /ve /f

 

:: ———