From d527d9576d1564fecf294d58a87c7e16eec319db Mon Sep 17 00:00:00 2001 From: Laszlo Nemeth <57342539+donlaci@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:37:21 +0200 Subject: [PATCH] [Workspaces]Fix snapshot tool: update capturing windows settings app (#35140) * [Workspaces] fix snapshot tool: update capturing windows settings app * spell checker * spell checker * minor change in app utils, when the system settings app is captured --- .github/actions/spell-check/expect.txt | 2 +- src/modules/Workspaces/WorkspacesLib/AppUtils.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 1fca6be137..47662c3766 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1590,7 +1590,7 @@ SYSKEYUP SYSLIB SYSMENU SYSTEMAPPS -systemsettings +SYSTEMSETTINGS SYSTEMTIME SYSTEMWOW tapp diff --git a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp index 7c9bfe332d..389e54eae5 100644 --- a/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp +++ b/src/modules/Workspaces/WorkspacesLib/AppUtils.cpp @@ -26,6 +26,7 @@ namespace Utils constexpr const wchar_t* FileExplorerName = L"File Explorer"; constexpr const wchar_t* FileExplorerPath = L"C:\\WINDOWS\\EXPLORER.EXE"; + constexpr const wchar_t* SystemSettingsPath = L"SYSTEMSETTINGS.EXE"; constexpr const wchar_t* PowerToys = L"PowerToys.exe"; constexpr const wchar_t* PowerToysSettingsUpper = L"POWERTOYS.SETTINGS.EXE"; constexpr const wchar_t* PowerToysSettings = L"PowerToys.Settings.exe"; @@ -257,6 +258,14 @@ namespace Utils if (appPathUpper.contains(installPathUpper)) { + // check if the found app is the System Settings. If yes, update the install path to the exe path + if (appPathUpper.ends_with(NonLocalizable::SystemSettingsPath)) + { + auto settingsAppData = appData; + settingsAppData.installPath = appPath; + return settingsAppData; + } + return appData; }