Skip to content

Commit

Permalink
Broadcast WM_SETTINGCHANGE on change of path (microsoft#3751)
Browse files Browse the repository at this point in the history
* Broadcast WM_SETTINGCHANGE on change of path

* Spelling

* Update src/AppInstallerCommonCore/PathVariable.cpp

Co-authored-by: yao-msft <[email protected]>

---------

Co-authored-by: yao-msft <[email protected]>
  • Loading branch information
2 people authored and JohnMcPMS committed Nov 7, 2023
1 parent b71b83c commit 152c8fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ seof
servercert
servercertificate
setmetadatabymanifestid
SETTINGCHANGE
SETTINGMAPPING
SHCONTF
SHGDN
Expand Down
2 changes: 2 additions & 0 deletions src/AppInstallerCommonCore/PathVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 152c8fc

Please sign in to comment.