ep_dwm: Renamed ep_dwm.exe to ep_dwm_svc.exe
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
Submodule ep_dwm updated: f56d477c50...7c1271a9b7
+2
-2
@@ -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";
|
||||
|
||||
+7
-20
@@ -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");
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
<PackFile Include="..\build\$(Configuration)\x64\ExplorerPatcher.amd64.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\x64\ExplorerPatcher.amd64.dll')" />
|
||||
<PackFile Include="..\build\$(Configuration)\ARM64\ExplorerPatcher.arm64.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\ARM64\ExplorerPatcher.arm64.dll')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\WebView2Loader.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\WebView2Loader.dll')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_dwm.exe" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_dwm.exe')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_gui.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_gui.dll')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_startmenu.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_startmenu.dll')" />
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll')" />
|
||||
@@ -290,7 +290,7 @@
|
||||
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll')" />
|
||||
</ItemGroup>
|
||||
<Target Name="GetCommitHash" AfterTargets="PrepareForBuild">
|
||||
<Exec Command="git rev-parse --short HEAD" ConsoleToMSBuild="true" Condition="'$(GitCommitHashShort)' == '0000000'">
|
||||
<Exec Command="git rev-parse --short HEAD" Condition="'$(GitCommitHashShort)' == '0000000'">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHashShort" />
|
||||
</Exec>
|
||||
<Message Text="Git commit hash: $(GitCommitHashShort)" />
|
||||
|
||||
Reference in New Issue
Block a user