mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-11 17:37:22 +10:00
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.
This commit is contained in:
@@ -327,9 +327,15 @@ static std::vector<std::vector<uint8_t>> ParseModernSettings()
|
|||||||
doc->put_async(VARIANT_FALSE);
|
doc->put_async(VARIANT_FALSE);
|
||||||
|
|
||||||
wchar_t path[MAX_PATH]{};
|
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));
|
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;
|
VARIANT_BOOL loaded;
|
||||||
if (SUCCEEDED(doc->load(CComVariant(path), &loaded)) && loaded)
|
if (SUCCEEDED(doc->load(CComVariant(path), &loaded)) && loaded)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user