Skip to content

Commit f16ebb6

Browse files
committed
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.
1 parent 5809217 commit f16ebb6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Src/StartMenu/StartMenuHelper/ModernSettings.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,15 @@ static std::vector<std::vector<uint8_t>> ParseModernSettings()
327327
doc->put_async(VARIANT_FALSE);
328328

329329
wchar_t path[MAX_PATH]{};
330-
wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml)");
330+
wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{FDB289F3-FCFC-4702-8015-18926E996EC1}.xml)");
331331
DoEnvironmentSubst(path, _countof(path));
332332

333+
if (!PathFileExists(path))
334+
{
335+
wcscpy_s(path, LR"(%windir%\ImmersiveControlPanel\Settings\AllSystemSettings_{253E530E-387D-4BC2-959D-E6F86122E5F2}.xml)");
336+
DoEnvironmentSubst(path, _countof(path));
337+
}
338+
333339
VARIANT_BOOL loaded;
334340
if (SUCCEEDED(doc->load(CComVariant(path), &loaded)) && loaded)
335341
{

0 commit comments

Comments
 (0)