|
|
|
@ -1152,29 +1152,15 @@ int WINAPI wWinMain( |
|
|
|
Sleep(500); |
|
|
|
Sleep(500); |
|
|
|
|
|
|
|
|
|
|
|
BOOL bAreRoundedCornersDisabled = FALSE; |
|
|
|
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 (h_exists) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (GetLastError() == ERROR_ALREADY_EXISTS) |
|
|
|
bAreRoundedCornersDisabled = GetLastError() == ERROR_ALREADY_EXISTS; |
|
|
|
{ |
|
|
|
|
|
|
|
bAreRoundedCornersDisabled = TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
bAreRoundedCornersDisabled = FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
CloseHandle(h_exists); |
|
|
|
CloseHandle(h_exists); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (GetLastError() == ERROR_ACCESS_DENIED) |
|
|
|
bAreRoundedCornersDisabled = GetLastError() == ERROR_ACCESS_DENIED; |
|
|
|
{ |
|
|
|
|
|
|
|
bAreRoundedCornersDisabled = TRUE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
bAreRoundedCornersDisabled = FALSE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (bAreRoundedCornersDisabled) |
|
|
|
if (bAreRoundedCornersDisabled) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -1185,8 +1171,8 @@ int WINAPI wWinMain( |
|
|
|
WCHAR wszSCPath[MAX_PATH]; |
|
|
|
WCHAR wszSCPath[MAX_PATH]; |
|
|
|
GetSystemDirectoryW(wszSCPath, MAX_PATH); |
|
|
|
GetSystemDirectoryW(wszSCPath, MAX_PATH); |
|
|
|
wcscat_s(wszSCPath, MAX_PATH, L"\\sc.exe"); |
|
|
|
wcscat_s(wszSCPath, MAX_PATH, L"\\sc.exe"); |
|
|
|
SHELLEXECUTEINFO ShExecInfo = { 0 }; |
|
|
|
SHELLEXECUTEINFOW ShExecInfo = { 0 }; |
|
|
|
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); |
|
|
|
ShExecInfo.cbSize = sizeof(ShExecInfo); |
|
|
|
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; |
|
|
|
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; |
|
|
|
ShExecInfo.hwnd = NULL; |
|
|
|
ShExecInfo.hwnd = NULL; |
|
|
|
ShExecInfo.lpVerb = L"runas"; |
|
|
|
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"); |
|
|
|
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, PRODUCT_NAME ".arm64.dll", wszPath, _T(PRODUCT_NAME) L".arm64.dll"); |
|
|
|
#endif |
|
|
|
#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_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 (bInstall) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_weather_host.dll", wszPath, L"ep_weather_host.dll"); |
|
|
|
if (CHECK_OK(bOk)) bOk = InstallResource(bInstall, hInstance, zipFile, "ep_weather_host.dll", wszPath, L"ep_weather_host.dll"); |
|
|
|
|