Explorer Tab Router
Reuse and activate Explorer folder tabs, preserve file selection and explicit new windows
Author: afate123

English
Explorer Tab Router keeps ordinary folder-opening requests together in Windows 11 File Explorer while preserving explicit requests for a separate window.
Behavior
- Open a folder externally: reuse and activate an existing tab for that folder. If the folder is not open, route the new folder window into a tab in an existing Explorer window.
- Show a file in its folder: activate the matching folder tab and preserve the requested file selection.
- Open in new tab from a folder context menu: create a new tab and switch to it automatically, including when that folder already has another tab. Middle-click, background tab creation, and restored tabs keep their native activation behavior.
- Open in new window: keep the explicitly requested window separate.
- Hold Shift while opening a folder: bypass ordinary window-to-tab routing and keep a separate window.
Enable the mod in Windhawk, then use File Explorer and other applications normally. Folder routing and tab activation do not require a separate application list. Control Panel and unsupported shell locations are allowed to remain in their own windows.
Settings
Window routing, matching-tab reuse during routing, folder-menu new-tab activation, and ShellWindows lookup activation can be enabled independently. All four are enabled by default.
The lookup compatibility option is needed by some external folder-opening and file-reveal requests. The ShellWindows query interface does not say whether a caller intends to open a folder or only inspect it. With this option enabled, a successful read-only query can also switch tabs. Disable it if query-triggered activation is undesirable; some external requests will then no longer switch an existing tab. Delayed lookup activation is canceled if the user switches to another foreground window or selects a different tab before it runs.
Source and conflicting mods
This mod builds on the routing approach introduced by Explorer Single Window Tabs by ALMAS CP. It adds existing-tab reuse and activation, file-selection preservation, explicit-window handling, automatic new-tab activation, and managed presentation recovery.
Do not enable Explorer Single Window Tabs and Explorer Tab Router together. Disable the other routing mod first.
Compatibility and limitations
Windows 11 x64 with native File Explorer tabs is required. This mod uses internal shell symbols, which are checked when it loads. A future Windows update can require a compatibility update.
For routing between Explorer processes, use windows on the same desktop and at the same privilege level. Mixing ordinary and elevated Explorer windows is outside the supported configuration.
Ctrl+N and dragging a tab into a separate window can create frames without the explicit folder-menu intent this mod recognizes. Those frames may be routed back into tabs. Disable window routing when you need to retain them as separate windows.
Some requests are handled through a temporary transparent Explorer window before routing completes. This is not a guarantee of entirely window-free navigation. If a request cannot be completed safely, the temporary window is restored instead of discarding the request. Window presentation state, including existing layered transparency, is restored on recovery.
Tab activation resolves the target window handle against Explorer's current tab order and issues one verified selection command. It does not step through unrelated tabs. If the required internal activation symbols are unavailable or the tab changes during resolution, activation fails safely; a routing failure restores the original window. Navigation completion uses browser events with bounded direct-view checks for providers that omit events.
If tab navigation cannot be confirmed before the timeout, the original window is restored. A slow location, such as a network share, can finish loading in the tab later and leave both copies open.
The mod is distributed under the MIT license.
简体中文
资源管理器页签路由将普通的文件夹打开请求集中到 Windows 11 资源管理器页签中,同时保留明确要求打开独立窗口的操作。
使用行为
- 从外部应用打开文件夹: 已有相同目录页签时,复用并切换过去;尚未打开时,将新目录窗口转入现有资源管理器的页签。
- 在文件夹中显示文件: 切换到对应目录页签,并保留目标文件的选中状态。
- 文件夹右键菜单中的“在新标签页中打开”: 新建页签并自动切换,即使相同目录已有其他页签。中键、其他后台创建及启动恢复的页签保持系统原有的激活行为。
- 在新窗口中打开: 保留明确请求的独立窗口。
- 按住 Shift 打开文件夹: 绕过普通窗口转页签行为,保留独立窗口。
在 Windhawk 中启用后即可正常使用,不需要逐个添加应用名单。控制面板及不支持的 Shell 位置可以保持独立窗口。
设置
窗口转页签、路由时复用相同目录、文件夹菜单新页签自动激活、ShellWindows 查询命中后激活,可分别开关;默认全部启用。
查询兼容开关用于部分外部打开目录和文件定位请求。ShellWindows 查询接口不区分“打开文件夹”和“只检查是否已打开”,因此启用后,成功的纯查询也可能切换页签。若不希望查询触发切换,可关闭此项;部分外部请求也会因此不再自动切换已有页签。延迟执行查询激活前,若用户已转到其他前台窗口或切换了不同页签,会取消这次延迟激活。
来源与冲突提示
本 mod 基于 ALMAS CP 的 Explorer Single Window Tabs 路由思路扩展,增加已有页签复用与切换、文件选中保留、明确的新窗口请求识别、新页签自动激活,以及窗口状态恢复管理。
请勿同时启用 Explorer Single Window Tabs 与 Explorer Tab Router;启用前先停用另一个路由 mod。
兼容性与限制
需要 Windows 11 x64 以及支持原生页签的资源管理器。加载时会检查所需的系统内部符号,未来 Windows 更新可能需要同步更新兼容实现。
在资源管理器进程之间路由时,请使用同一桌面、相同权限级别的窗口;混用普通权限和管理员权限的资源管理器窗口不属于支持范围。
Ctrl+N 和将页签拖出为独立窗口,可能不携带本 mod 能识别的文件夹菜单意图,因此产生的窗口仍可能被合并回页签;需要保留这些独立窗口时,可关闭窗口转页签设置。
部分请求会先经过临时透明窗口,再完成页签路由,因此不保证整个过程完全不创建窗口。无法安全完成时会恢复临时窗口,避免丢弃打开请求;恢复时会还原原有窗口显示状态,包括已有的分层透明属性。
页签切换会先按窗口句柄查找当前页签位置,再发出一次经过验证的切换命令,不再逐个显示其他页签。所需内部接口缺失或查找期间目标发生变化时,会安全终止激活;路由失败时恢复原窗口。导航完成优先使用浏览器事件;缺少事件时只进行有限次直接视图检查。
如果超时前无法确认页签导航完成,会恢复原窗口。网络共享等加载较慢的位置可能随后在页签中打开,此时两处都会保留该目录。
本 mod 使用 MIT 许可。