From b669b0aca4bbd9afe06067ca11171d4c7fec6b4c Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 4 Mar 2022 00:34:52 +0200 Subject: [PATCH] Start: Fixed a bug that prevented the app from receiving settings change notifications when some registry keys were not available on the system --- ep_setup/ep_setup.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index e1ef01b..79d1491 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -1052,6 +1052,20 @@ int WINAPI wWinMain( CloseHandle(sei.hProcess); } } + if (bOk && bInstall) + { + HKEY hKey = NULL; + RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Policies\\Microsoft\\Windows\\Explorer", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ, NULL, &hKey, NULL); + if (hKey && hKey != INVALID_HANDLE_VALUE) + { + RegCloseKey(hKey); + } + RegCreateKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ, NULL, &hKey, NULL); + if (hKey && hKey != INVALID_HANDLE_VALUE) + { + RegCloseKey(hKey); + } + } if (!bInstall) { if (bOk)