How to programmatically modify the order of system tray icons on Win11?
After Win11 22H2, it is no longer possible to use TB-BUTTONCOUNT to obtain any information about the system tray. Microsoft has rewritten the taskbar UI using Xaml. I tried to find a new solution, and then I noticed in the registry that the value key “UIOrderList” in the “HKEY-CURRENT-USERControl PanelNotifyIconSettings” path may be related to the order of icons. When I manually drag the icon, this data is changed. I tried to modify the list, but obviously Explorer will not immediately be aware of the changes here (it will take effect after restarting Explorer). What is the way to make it take effect immediately? I tried stack tracing and debugging to find that the module for modifying the registry is Taskbar.dll located in the System32 directory. Any assistance in reverse engineering will be effective, thank you, anyone.