[Home] [Purchase] [Download] [Manual] [Acknowledgements] [Sitemap] [Release Notes] [FAQ]

Up ] New ] Open ] Save ] Save As ] Delete keyboard layout ] Generate Layout Install Package ] Import KBE file ] Export KBE file ] Import KLC file ] Import Mac .keylayout file ] Register Layout DLL file ] Manage language bar list ] [ Restoring custom layouts lost during a Windows 10 upgrade ]

Restoring custom layouts lost during a Windows 10 upgrade

Major Windows 10 updates, such as 1903 from May 2019, 1809 from October 2018 and earlier, are infamous for their eagerness to revert various user customisations to their default values. This unfortunately includes custom keyboard layouts created by KbdEdit - after each major update, the registry list of installed layouts is reset to the built-in keyboard layouts available in the new version, causing all custom layouts to seemingly disappear.
(Interestingly, custom layout DLL files are preserved in their original location under the system directory, but they remain inaccessible without proper registration entries under HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts.)

Since version 19.8.0, KbdEdit is able to detect and restore any missing custom layouts. To benefit from this feature, you have to launch KbdEdit manually as soon as possible after a Windows 10 upgrade has completed. If any missing layouts have been detected, a special "Restore layouts from previous OS version" dialog will be shown:

KbdEdit restore custom keyboard layouts lost during a Windows 10 update

Clicking Restore selected layouts will perform an automated recovery of all selected layouts.
(Note that you may still have to manually re-add the restored layouts to the language bar list .)

A closer look at the layout recovery process

To check for any missing layouts, the original layout registration list is retrieved from the old OS version's HKLM registry hive backup, which is helpfully saved by the Windows installer under c:\Windows.old\Windows\System32\config\. Any custom layouts found in the old list, but missing in the current one, are assumed to have been lost during the upgrade, and are shown in the above list of "restorable" layouts.

When restoring the selected layouts, their KLID, layout name, and hidden numeric layout id attributes are checked against existing values in the current (post-OS upgrade) list of layouts. If any of the existing layouts has the same attribute value, the restored layout's attribute is set to a unique auto-generated value. This prevents layout attribute duplication, which is essential for the correct functioning of both the restored custom layouts and the built-in standard ones.

The recovery logic does not attempt to restore any custom layout DLL files under C:\Windows\system32\ - as mentioned above, these files are normally preserved by the Windows 10 upgrade process. However, an extra check is being performed for each "restorable" layout, to verify that its layout DLL file still exists. This prevents an accidental recovery of "phantom" custom layouts referencing a non-existent layout DLL file.

What if the Windows.old directory no longer exists?

The automated recovery is possible only if the c:\Windows.old\ directory is still available. The size of this directory is significant, so to save on disk space, Windows automatically deletes it after the expiration of the "grace" 10 day period, during which a rollback to the previous version is possible (note that the grace period can be extended, as explained here).

To ensure a full recovery of the custom layouts, you should therefore launch KbdEdit at least once within the post-upgrade grace period. Once the Windows.old directory is gone, an exact recovery of the original custom layouts' registrations is no longer possible.

However, as long as the original layout DLL files are present in the system32 directory, you can still manually re-register them using the Register Layout DLL file command (check "Show only unregistered files" to locate your layout files more easily).

This will make the layouts accessible again, although the registration details (KLID, layout name, etc) may not exactly match the original values.

Manual index

Copyright KbdSoft 2007-2023