diff --git a/ExplorerPatcher/updates.cpp b/ExplorerPatcher/updates.cpp
index d97a566..1420adf 100644
--- a/ExplorerPatcher/updates.cpp
+++ b/ExplorerPatcher/updates.cpp
@@ -752,8 +752,8 @@ BOOL IsUpdateAvailableHelper(
}
}
- SHELLEXECUTEINFO ShExecInfo = { 0 };
- ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ SHELLEXECUTEINFOW ShExecInfo = { 0 };
+ ShExecInfo.cbSize = sizeof(ShExecInfo);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = nullptr;
ShExecInfo.lpVerb = bIsUsingEpMake ? L"open" : L"runas";
diff --git a/ExplorerPatcher/utility.c b/ExplorerPatcher/utility.c
index 8a49aa7..6fe57ad 100644
--- a/ExplorerPatcher/utility.c
+++ b/ExplorerPatcher/utility.c
@@ -626,15 +626,7 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
WCHAR wszRundll32[MAX_PATH];
SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszRundll32);
wcscat_s(wszRundll32, MAX_PATH, _T(APP_RELATIVE_PATH));
- wcscat_s(wszRundll32, MAX_PATH, L"\\ep_dwm.exe");
-
- WCHAR wszEP[MAX_PATH];
- GetWindowsDirectoryW(wszEP, MAX_PATH);
- wcscat_s(wszEP, MAX_PATH, L"\\dxgi.dll");
-
- WCHAR wszTaskkill[MAX_PATH];
- GetSystemDirectoryW(wszTaskkill, MAX_PATH);
- wcscat_s(wszTaskkill, MAX_PATH, L"\\taskkill.exe");
+ wcscat_s(wszRundll32, MAX_PATH, L"\\ep_dwm_svc.exe");
WCHAR wszArgumentsRegister[MAX_PATH * 10];
swprintf_s(
@@ -675,34 +667,20 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
HANDLE h_exists = CreateEventW(NULL, FALSE, FALSE, _T(EP_DWM_EVENTNAME));
if (h_exists)
{
- if (GetLastError() == ERROR_ALREADY_EXISTS)
- {
- bAreRoundedCornersDisabled = TRUE;
- }
- else
- {
- bAreRoundedCornersDisabled = FALSE;
- }
+ bAreRoundedCornersDisabled = GetLastError() == ERROR_ALREADY_EXISTS;
CloseHandle(h_exists);
}
else
{
- if (GetLastError() == ERROR_ACCESS_DENIED)
- {
- bAreRoundedCornersDisabled = TRUE;
- }
- else
- {
- bAreRoundedCornersDisabled = FALSE;
- }
+ bAreRoundedCornersDisabled = GetLastError() == ERROR_ACCESS_DENIED;
}
if ((bAreRoundedCornersDisabled && dwDesiredState) || (!bAreRoundedCornersDisabled && !dwDesiredState))
{
return FALSE;
}
}
- SHELLEXECUTEINFO ShExecInfo = { 0 };
- ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ SHELLEXECUTEINFOW ShExecInfo = { 0 };
+ ShExecInfo.cbSize = sizeof(ShExecInfo);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = L"runas";
diff --git a/ep_dwm b/ep_dwm
index f56d477..7c1271a 160000
--- a/ep_dwm
+++ b/ep_dwm
@@ -1 +1 @@
-Subproject commit f56d477c50cc87d596c02f7888c5746ee672d6eb
+Subproject commit 7c1271a9b72abdee99ff3367226b763a94f4949c
diff --git a/ep_gui/GUI.c b/ep_gui/GUI.c
index ba5af5c..a92801c 100644
--- a/ep_gui/GUI.c
+++ b/ep_gui/GUI.c
@@ -27,8 +27,8 @@ LSTATUS SetPolicy(HKEY hKey, LPCWSTR wszPolicyPath, LPCWSTR wszPolicyName, DWORD
{
swprintf_s(wszArguments, MAX_PATH, L"DELETE \"%s\\%s\" /V %s /F", (hKey == HKEY_LOCAL_MACHINE ? L"HKLM" : L"HKCU"), wszPolicyPath, wszPolicyName);
}
- SHELLEXECUTEINFO ShExecInfo = { 0 };
- ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ SHELLEXECUTEINFOW ShExecInfo = { 0 };
+ ShExecInfo.cbSize = sizeof(ShExecInfo);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = L"runas";
diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c
index 8f8accb..0368a79 100644
--- a/ep_setup/ep_setup.c
+++ b/ep_setup/ep_setup.c
@@ -1152,29 +1152,15 @@ int WINAPI wWinMain(
Sleep(500);
BOOL bAreRoundedCornersDisabled = FALSE;
- HANDLE h_exists = CreateEventW(NULL, FALSE, FALSE, L"Global\\ep_dwm_" _T(EP_CLSID));
+ HANDLE h_exists = CreateEventW(NULL, FALSE, FALSE, _T(EP_DWM_EVENTNAME));
if (h_exists)
{
- if (GetLastError() == ERROR_ALREADY_EXISTS)
- {
- bAreRoundedCornersDisabled = TRUE;
- }
- else
- {
- bAreRoundedCornersDisabled = FALSE;
- }
+ bAreRoundedCornersDisabled = GetLastError() == ERROR_ALREADY_EXISTS;
CloseHandle(h_exists);
}
else
{
- if (GetLastError() == ERROR_ACCESS_DENIED)
- {
- bAreRoundedCornersDisabled = TRUE;
- }
- else
- {
- bAreRoundedCornersDisabled = FALSE;
- }
+ bAreRoundedCornersDisabled = GetLastError() == ERROR_ACCESS_DENIED;
}
if (bAreRoundedCornersDisabled)
{
@@ -1185,8 +1171,8 @@ int WINAPI wWinMain(
WCHAR wszSCPath[MAX_PATH];
GetSystemDirectoryW(wszSCPath, MAX_PATH);
wcscat_s(wszSCPath, MAX_PATH, L"\\sc.exe");
- SHELLEXECUTEINFO ShExecInfo = { 0 };
- ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ SHELLEXECUTEINFOW ShExecInfo = { 0 };
+ ShExecInfo.cbSize = sizeof(ShExecInfo);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = L"runas";
@@ -1327,7 +1313,8 @@ int WINAPI wWinMain(
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, PRODUCT_NAME ".arm64.dll", wszPath, _T(PRODUCT_NAME) L".arm64.dll");
#endif
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_gui.dll", wszPath, L"ep_gui.dll");
- if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_dwm.exe", wszPath, L"ep_dwm.exe");
+ if (CHECK_OK(bOk)) bOk = DeleteResource(wszPath, L"ep_dwm.exe"); // We renamed it to ep_dwm_svc.exe due to Microsoft imposing 24H2 upgrade blocks
+ if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_dwm_svc.exe", wszPath, L"ep_dwm_svc.exe");
if (bInstall)
{
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_weather_host.dll", wszPath, L"ep_weather_host.dll");
diff --git a/ep_setup/ep_setup.vcxproj b/ep_setup/ep_setup.vcxproj
index 8297160..b7ebb80 100644
--- a/ep_setup/ep_setup.vcxproj
+++ b/ep_setup/ep_setup.vcxproj
@@ -277,7 +277,7 @@
-
+
@@ -290,7 +290,7 @@
-
+