From f16ebb65eb3123ff925af1aa1a7a4e41f536993a Mon Sep 17 00:00:00 2001 From: ge0rdi Date: Tue, 3 Dec 2024 10:10:23 +0100 Subject: [PATCH] ModernSettings: Use proper AllSystemSettings file on newer Win11 It seems that AllSystemSettings file name changed since 24H2. We will look for new file first and then fall-back to original one. Fixes #2033. --- Src/StartMenu/StartMenuHelper/ModernSettings.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Src/StartMenu/StartMenuHelper/ModernSettings.cpp b/Src/StartMenu/StartMenuHelper/ModernSettings.cpp index 88f5a987e..a177340e5 100644 --- a/Src/StartMenu/StartMenuHelper/ModernSettings.cpp +++ b/Src/StartMenu/StartMenuHelper/ModernSettings.cpp @@ -327,9 +327,15 @@ static std::vector> ParseModernSettings() doc->put_async(VARIANT_FALSE); wchar_t path[MAX_PATH]{}; - wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml)"); + wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{FDB289F3-FCFC-4702-8015-18926E996EC1}.xml)"); DoEnvironmentSubst(path, _countof(path)); + if (!PathFileExists(path)) + { + wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml)"); + DoEnvironmentSubst(path, _countof(path)); + } + VARIANT_BOOL loaded; if (SUCCEEDED(doc->load(CComVariant(path), &loaded)) && loaded) {