Skip to content

Commit

Permalink
Broadcast WM_SETTINGCHANGE on change of path (#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
Trenly and yao-msft authored Oct 11, 2023
1 parent 8cf1a43 commit 7ca4297
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 @@ -419,6 +419,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 7ca4297

Please sign in to comment.