winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7ca4297448064d97e874ac24a4d3d6be39fa5098
parent 8cf1a4321e5b8dfbbbf6f999c9c61516dd328745
Author: Kaleb Luedtke <jluedtk@jci.com>
Date:   Wed, 11 Oct 2023 18:48:37 -0500

Broadcast WM_SETTINGCHANGE on change of path (#3751)

* Broadcast WM_SETTINGCHANGE on change of path

* Spelling

* Update src/AppInstallerCommonCore/PathVariable.cpp

Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>

---------

Co-authored-by: yao-msft <50888816+yao-msft@users.noreply.github.com>
Diffstat:
M.github/actions/spelling/expect.txt | 1+
Msrc/AppInstallerCommonCore/PathVariable.cpp | 2++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt @@ -419,6 +419,7 @@ seof servercert servercertificate setmetadatabymanifestid +SETTINGCHANGE SETTINGMAPPING SHCONTF SHGDN diff --git a/src/AppInstallerCommonCore/PathVariable.cpp b/src/AppInstallerCommonCore/PathVariable.cpp @@ -121,6 +121,8 @@ namespace AppInstaller::Registry::Environment std::wstring pathName = std::wstring{ s_PathName }; m_key.SetValue(pathName, ConvertToUTF16(value), REG_EXPAND_SZ); + SendNotifyMessageW(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)TEXT("Environment")); + } bool RefreshPathVariableForCurrentProcess()