Non-persistent keyboard layouts

I found out that my keyboard layouts were not staying in VDI after I log off. So I had to automate this and not lose my time with adding my layouts every day.

So you simply create a .cmd file with the following content:

control intl.cpl,, /f:”DRIVE:\FULL\PATH\TO\FILE.XML”​

Then you create a FILE.XML in that location, containing the folowing XML:

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
    <gs:UserList>
        <gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/></gs:UserList>
    <gs:InputPreferences>
        <gs:InputLanguageID Action="add" ID="0402:00040402"/>
    ​</gs:InputPreferences>
</gs:GlobalizationServices>

​The 00040402​ is the hex code identifier of the keyboard layout you need (in this case 0x00040402 – Bulgarian (phonetic traditional).

This article has all the keyboard hexadecimal identifiers that one might need:

https://technet.microsoft.com/en-us/library/hh825684.aspx​

Then you just open the windows scheduler and add this .cmd to execute on Log On and on Work station Unlock and add to Window Startup folder and there you go!

Add a Comment

Your email address will not be published. Required fields are marked *