Skip to content

Commit cc36e34

Browse files
committed
feat(ep_taskbar): support Windows Server 2022 and revise naming scheme
1 parent 2267154 commit cc36e34

4 files changed

Lines changed: 44 additions & 24 deletions

File tree

ExplorerPatcher/dllmain.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11042,6 +11042,18 @@ DWORD Inject(BOOL bIsExplorer)
1104211042
"\x4C\x8D\x05\x00\x00\x00\x00\x48\x8D\x0D\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x85\xC0",
1104311043
"xxx????xxx????x????xx"
1104411044
);
11045+
if (!match)
11046+
{
11047+
// 20348 (Iron; Server 2022)
11048+
// 4C 8D 05 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B
11049+
// ^^^^^^^^^^^
11050+
match = FindPattern(
11051+
pExplorerText,
11052+
cbExplorerText,
11053+
"\x4C\x8D\x05\x00\x00\x00\x00\x48\x8D\x0D\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x48\x8B",
11054+
"xxx????xxx????x????xx"
11055+
);
11056+
}
1104511057
if (match)
1104611058
{
1104711059
match += 7; // Point to 48

ExplorerPatcher/utility.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,33 +1397,33 @@ inline const WCHAR* PickTaskbarDll()
13971397
|| b >= 18362 && b <= 18363 // Windows 10 1903, 1909
13981398
|| b >= 19041 && b <= 19045) // Windows 10 20H2, 21H2, 22H2
13991399
{
1400-
return L"ep_taskbar.0.dll";
1400+
return L"ep_taskbar.rs2.dll";
14011401
}
14021402

1403-
if (b >= 21343 && b <= 22000) // Windows 11 21H2
1403+
if (b == 20348) // Windows Server 2022
14041404
{
1405-
return L"ep_taskbar.1.dll";
1405+
return L"ep_taskbar.fe.dll";
14061406
}
14071407

1408-
if ((b >= 22621 && b <= 22635) // 22H2-23H2 Release, Release Preview, and Beta channels
1409-
|| (b >= 23403 && b <= 25197)) // Early pre-reboot Dev channel until post-reboot Dev channel
1408+
if (b >= 21343 && b <= 22000) // Windows 11 21H2
14101409
{
1411-
return L"ep_taskbar.2.dll";
1410+
return L"ep_taskbar.co.dll";
14121411
}
14131412

1414-
if (b >= 25201 && b <= 25915) // Pre-reboot Dev channel until early Canary channel, nuked ITrayComponentHost methods related to classic search box
1413+
if ((b >= 22621 && b <= 22635) // Windows 11 22H2-23H2 Release, Release Preview, and Beta channels
1414+
|| (b >= 23403 && b <= 25197)) // Early pre-reboot Dev channel until post-reboot Dev channel
14151415
{
1416-
return L"ep_taskbar.3.dll";
1416+
return L"ep_taskbar.ni.dll";
14171417
}
14181418

1419-
if (b >= 25921 && b <= 26040) // Canary channel with nuked classic system tray
1419+
if (b >= 25201 && b <= 25915) // Pre-reboot Dev channel until early Canary channel; Windows Server 23H2
14201420
{
1421-
return L"ep_taskbar.4.dll";
1421+
return L"ep_taskbar.zn.dll";
14221422
}
14231423

1424-
if (b >= 26052) // Same as 4 but with 2 new methods in ITrayComponentHost between GetTrayUI and ProgrammableTaskbarReportClick
1424+
if (b >= 25921) // Windows 11 24H2
14251425
{
1426-
return L"ep_taskbar.5.dll";
1426+
return L"ep_taskbar.ge.dll";
14271427
}
14281428

14291429
return NULL;

ep_setup/ep_setup.c

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -831,13 +831,21 @@ BOOL DownloadResource(BOOL bInstall, LPCWSTR pwszURL, DWORD dwSize, LPCSTR chash
831831

832832
void ProcessTaskbarDlls(BOOL* bInOutOk, BOOL bInstall, BOOL bExtractMode, HINSTANCE hInstance, unzFile zipFile, WCHAR wszPath[260])
833833
{
834+
// Delete ep_taskbars with old naming scheme
835+
DeleteResource(wszPath, L"ep_taskbar.0.dll");
836+
DeleteResource(wszPath, L"ep_taskbar.1.dll");
837+
DeleteResource(wszPath, L"ep_taskbar.2.dll");
838+
DeleteResource(wszPath, L"ep_taskbar.3.dll");
839+
DeleteResource(wszPath, L"ep_taskbar.4.dll");
840+
DeleteResource(wszPath, L"ep_taskbar.5.dll");
841+
834842
LPCWSTR pwszTaskbarDllName = bExtractMode ? NULL : PickTaskbarDll();
835-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.0.dll")), hInstance, zipFile, "ep_taskbar.0.dll", wszPath, L"ep_taskbar.0.dll");
836-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.1.dll")), hInstance, zipFile, "ep_taskbar.1.dll", wszPath, L"ep_taskbar.1.dll");
837-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.2.dll")), hInstance, zipFile, "ep_taskbar.2.dll", wszPath, L"ep_taskbar.2.dll");
838-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.3.dll")), hInstance, zipFile, "ep_taskbar.3.dll", wszPath, L"ep_taskbar.3.dll");
839-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.4.dll")), hInstance, zipFile, "ep_taskbar.4.dll", wszPath, L"ep_taskbar.4.dll");
840-
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.5.dll")), hInstance, zipFile, "ep_taskbar.5.dll", wszPath, L"ep_taskbar.5.dll");
843+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.rs2.dll")), hInstance, zipFile, "ep_taskbar.rs2.dll", wszPath, L"ep_taskbar.rs2.dll");
844+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.fe.dll")), hInstance, zipFile, "ep_taskbar.fe.dll", wszPath, L"ep_taskbar.fe.dll");
845+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.co.dll")), hInstance, zipFile, "ep_taskbar.co.dll", wszPath, L"ep_taskbar.co.dll");
846+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.ni.dll")), hInstance, zipFile, "ep_taskbar.ni.dll", wszPath, L"ep_taskbar.ni.dll");
847+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.zn.dll")), hInstance, zipFile, "ep_taskbar.zn.dll", wszPath, L"ep_taskbar.zn.dll");
848+
if (*bInOutOk) *bInOutOk = InstallResource(bInstall && (bExtractMode || pwszTaskbarDllName && !wcscmp(pwszTaskbarDllName, L"ep_taskbar.ge.dll")), hInstance, zipFile, "ep_taskbar.ge.dll", wszPath, L"ep_taskbar.ge.dll");
841849
}
842850

843851
BOOL RemoveDirectoryRecursive(const WCHAR* wszDirectoryPath)

ep_setup/ep_setup.vcxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,12 @@
280280
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe')" />
281281
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_gui.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_gui.dll')" />
282282
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_startmenu.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_startmenu.dll')" />
283-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll')" />
284-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.1.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.1.dll')" />
285-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.2.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.2.dll')" />
286-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.3.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.3.dll')" />
287-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.4.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.4.dll')" />
288-
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.5.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.5.dll')" />
283+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.rs2.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.rs2.dll')" />
284+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.fe.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.fe.dll')" />
285+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.co.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.co.dll')" />
286+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.ni.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.ni.dll')" />
287+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.zn.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.zn.dll')" />
288+
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.ge.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.ge.dll')" />
289289
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_weather_host.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_weather_host.dll')" />
290290
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll')" />
291291
</ItemGroup>

0 commit comments

Comments
 (0)