Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	ExplorerPatcher/GUI.h
#	ExplorerPatcher/dllmain.c
#	ExplorerPatcher/settings.reg
  • Loading branch information
Yukari316 committed Oct 6, 2023
2 parents 8a77f8f + 0b57e78 commit a37f6fd
Show file tree
Hide file tree
Showing 10 changed files with 423 additions and 242 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ Tested on OS builds 22000.2416, 22621.1, 22621.2134, 22621.2361, 22631.2338, and
* Taskbar10: Fixed Wi-Fi flyout buttons on OS build 22621 (0706393)
* Start10: Fixed start menu folders, show recently added, and show frequently used apps settings not being applied on OS builds 22621.2134+ (e28940d)

##### 3

* Start10: Pin to Start/Unpin from Start has been properly fixed on Start Menu and Explorer (but not Search yet) of all Windows 11 builds. (15c07a0)
* Start10: Fixed non-UWP apps not appearing on Dev channel builds 23545+. (a4f5bd0)

Many thanks to @Amrsatrio for sustained efforts in maintaining and improving ExplorerPatcher.

Thanks to @ARestrepo228 for hints on fixing Pin to Start/Unpin from Start.

## 22621.2283.57

Tested on OS build 22621.2283. Installer requires Internet connectivity.
Expand Down
8 changes: 8 additions & 0 deletions ExplorerPatcher/ExplorerPatcher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,18 @@
<ResourceCompile Include="ExplorerPatcher.rc" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="settings.reg" />
<None Include="settings10.reg" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion ExplorerPatcher/ExplorerPatcher.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,6 @@
<None Include="settings10.reg">
<Filter>Settings</Filter>
</None>
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>
120 changes: 0 additions & 120 deletions ExplorerPatcher/GUI.c
Original file line number Diff line number Diff line change
Expand Up @@ -2245,126 +2245,6 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
}
}
}
else if (!strncmp(line + 1, "pin_tiles", 9))
{
BOOL bFirst = TRUE;
DWORD dwPermitOldStartTileData = TRUE;
DWORD dwSize = sizeof(DWORD);
RegSetKeyValueW(HKEY_CURRENT_USER, L"Software\\ExplorerPatcher", L"PermitOldStartTileDataOneShot", REG_DWORD, &dwPermitOldStartTileData, dwSize);
/*
LPCWSTR csPath = L"::{26EE0668-A00A-44D7-9371-BEB064C98683}";
SFGAOF stSFGAOFIn = 0;
SFGAOF stSFGAOFOut = 0;
SHParseDisplayName(csPath, NULL, &pidl, stSFGAOFIn, &stSFGAOFOut);
*/
WCHAR wszOrigPath[MAX_PATH], wszCurPath[MAX_PATH];
IShellFolder* psfDesktop = NULL;
hr = SHGetDesktopFolder(&psfDesktop);
if (psfDesktop)
{
LPITEMIDLIST pidl;
hr = SHGetFolderLocation(NULL, CSIDL_CONTROLS, (HANDLE)-1, 0, &pidl);
if (pidl)
{
STRRET strret;
hr = psfDesktop->lpVtbl->GetDisplayNameOf(psfDesktop, pidl, SHGDN_FORPARSING, &strret);
StrRetToBufW(&strret, pidl, wszOrigPath, MAX_PATH);
SHOpenFolderAndSelectItems(pidl, 0, NULL, 0);
VARIANT vt;
HRESULT hr = E_FAIL;
IShellWindows* pShellWindows = NULL;
hr = CoCreateInstance(&CLSID_ShellWindows, NULL, CLSCTX_ALL, &IID_IShellWindows, &pShellWindows);
if (pShellWindows)
{
long k = 0;
pShellWindows->lpVtbl->get_Count(pShellWindows, &k);
for (int i = 0; i < k; ++i)
{
vt.vt = VT_I4;
vt.intVal = i;
IDispatch* pDispatch = NULL;
hr = pShellWindows->lpVtbl->Item(pShellWindows, vt, &pDispatch);
if (pDispatch)
{
IWebBrowserApp* pWebBrowserApp = NULL;
hr = pDispatch->lpVtbl->QueryInterface(pDispatch, &IID_IWebBrowserApp, &pWebBrowserApp);
if (pWebBrowserApp)
{
IServiceProvider* pServiceProvider = NULL;
hr = pWebBrowserApp->lpVtbl->QueryInterface(pWebBrowserApp, &IID_IServiceProvider, &pServiceProvider);
if (pServiceProvider)
{
IShellBrowser* pShellBrowser = NULL;
hr = pServiceProvider->lpVtbl->QueryService(pServiceProvider, &SID_STopLevelBrowser, &IID_IShellBrowser, &pShellBrowser);
if (pShellBrowser)
{
IShellView* pShellView = NULL;
hr = pShellBrowser->lpVtbl->QueryActiveShellView(pShellBrowser, &pShellView);
if (pShellView)
{
IFolderView* pFolderView = NULL;
hr = pShellView->lpVtbl->QueryInterface(pShellView, &IID_IFolderView, &pFolderView);
if (pFolderView)
{
IPersistFolder2* pPersistFolder2 = NULL;
hr = pFolderView->lpVtbl->GetFolder(pFolderView, &IID_IPersistFolder2, &pPersistFolder2);
if (pPersistFolder2)
{
LPITEMIDLIST pCur = NULL;
hr = pPersistFolder2->lpVtbl->GetCurFolder(pPersistFolder2, &pCur);
if (pCur)
{
hr = psfDesktop->lpVtbl->GetDisplayNameOf(psfDesktop, pCur, SHGDN_FORPARSING, &strret);
StrRetToBufW(&strret, pidl, wszCurPath, MAX_PATH);
if (!_wcsnicmp(wszOrigPath, wszCurPath, 40) && wcslen(wszCurPath) == 40 && bFirst)
{
LPITEMIDLIST pNew = NULL;
hr = SHGetFolderLocation(NULL, CSIDL_DRIVES, (HANDLE)-1, 0, &pNew);
if (pNew)
{
hr = pShellBrowser->lpVtbl->BrowseObject(pShellBrowser, pNew, SBSP_SAMEBROWSER);
if (SUCCEEDED(hr))
{
HWND hWndExp = NULL;
pWebBrowserApp->lpVtbl->get_HWND(pWebBrowserApp, &hWndExp);
if (hWndExp)
{
INPUT input;
ZeroMemory(&input, sizeof(INPUT));
input.type = INPUT_KEYBOARD;
input.ki.wVk = VK_F5;
SetForegroundWindow(hWndExp);
SendInput(1, &input, sizeof(INPUT));
bFirst = FALSE;
}
}
CoTaskMemFree(pNew);
}
}
CoTaskMemFree(pCur);
}
pPersistFolder2->lpVtbl->Release(pPersistFolder2);
}
pFolderView->lpVtbl->Release(pFolderView);
}
pShellView->lpVtbl->Release(pShellView);
}
pShellBrowser->lpVtbl->Release(pShellBrowser);
}
pServiceProvider->lpVtbl->Release(pServiceProvider);
}
pWebBrowserApp->lpVtbl->Release(pWebBrowserApp);
}
pDispatch->lpVtbl->Release(pDispatch);
}
}
pShellWindows->lpVtbl->Release(pShellWindows);
}
CoTaskMemFree(pidl);
}
psfDesktop->lpVtbl->Release(psfDesktop);
}
}
else if (!strncmp(line + 1, "spotlight_menu", 14))
{
POINT p;
Expand Down
3 changes: 0 additions & 3 deletions ExplorerPatcher/GUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include "utility.h"
#include "../ep_weather_host/ep_weather.h"
#include "../ep_weather_host/ep_weather_host_h.h"
#include <ExDisp.h>
#include <ShlGuid.h>
#include "helper.h"

#define MAX_LINE_LENGTH 2000
extern HMODULE hModule;
Expand Down
Loading

0 comments on commit a37f6fd

Please sign in to comment.