@@ -1152,29 +1152,15 @@ int WINAPI wWinMain(
11521152 Sleep (500 );
11531153
11541154 BOOL bAreRoundedCornersDisabled = FALSE;
1155- HANDLE h_exists = CreateEventW (NULL , FALSE, FALSE, L"Global\\ep_dwm_" _T (EP_CLSID ));
1155+ HANDLE h_exists = CreateEventW (NULL , FALSE, FALSE, _T (EP_DWM_EVENTNAME ));
11561156 if (h_exists )
11571157 {
1158- if (GetLastError () == ERROR_ALREADY_EXISTS )
1159- {
1160- bAreRoundedCornersDisabled = TRUE;
1161- }
1162- else
1163- {
1164- bAreRoundedCornersDisabled = FALSE;
1165- }
1158+ bAreRoundedCornersDisabled = GetLastError () == ERROR_ALREADY_EXISTS ;
11661159 CloseHandle (h_exists );
11671160 }
11681161 else
11691162 {
1170- if (GetLastError () == ERROR_ACCESS_DENIED )
1171- {
1172- bAreRoundedCornersDisabled = TRUE;
1173- }
1174- else
1175- {
1176- bAreRoundedCornersDisabled = FALSE;
1177- }
1163+ bAreRoundedCornersDisabled = GetLastError () == ERROR_ACCESS_DENIED ;
11781164 }
11791165 if (bAreRoundedCornersDisabled )
11801166 {
@@ -1185,8 +1171,8 @@ int WINAPI wWinMain(
11851171 WCHAR wszSCPath [MAX_PATH ];
11861172 GetSystemDirectoryW (wszSCPath , MAX_PATH );
11871173 wcscat_s (wszSCPath , MAX_PATH , L"\\sc.exe" );
1188- SHELLEXECUTEINFO ShExecInfo = { 0 };
1189- ShExecInfo .cbSize = sizeof (SHELLEXECUTEINFO );
1174+ SHELLEXECUTEINFOW ShExecInfo = { 0 };
1175+ ShExecInfo .cbSize = sizeof (ShExecInfo );
11901176 ShExecInfo .fMask = SEE_MASK_NOCLOSEPROCESS ;
11911177 ShExecInfo .hwnd = NULL ;
11921178 ShExecInfo .lpVerb = L"runas" ;
@@ -1327,7 +1313,8 @@ int WINAPI wWinMain(
13271313 if (CHECK_OK (bOk )) bOk = InstallResource (bInstall , hInstance , zipFile , PRODUCT_NAME ".arm64.dll" , wszPath , _T (PRODUCT_NAME ) L".arm64.dll" );
13281314#endif
13291315 if (CHECK_OK (bOk )) bOk = InstallResource (bInstall , hInstance , zipFile , "ep_gui.dll" , wszPath , L"ep_gui.dll" );
1330- if (CHECK_OK (bOk )) bOk = InstallResource (bInstall , hInstance , zipFile , "ep_dwm.exe" , wszPath , L"ep_dwm.exe" );
1316+ 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
1317+ if (CHECK_OK (bOk )) bOk = InstallResource (bInstall , hInstance , zipFile , "ep_dwm_svc.exe" , wszPath , L"ep_dwm_svc.exe" );
13311318 if (bInstall )
13321319 {
13331320 if (CHECK_OK (bOk )) bOk = InstallResource (bInstall , hInstance , zipFile , "ep_weather_host.dll" , wszPath , L"ep_weather_host.dll" );
0 commit comments