Explorer Tabs Session Saver Revamped
Saves and restores File Explorer tabs on reopen, without blank extra tabs or sidebar scroll glitches
Author: Peter2oo1
This mod saves your open File Explorer tabs and automatically restores them whenever you reopen File Explorer.
It is an enhanced successor to Explorer Tabs Session Saver by noX1st, fixing several core issues and edge cases.

Improvements Over the Original Mod
- No Extra "Blank" Tab on Restore: When File Explorer opens to a default start location (Home or This PC), the initial left-most tab is navigated in-place (
IWebBrowser2::Navigate / IShellBrowser::BrowseObject) instead of spawning a separate ShellExecuteExW call for the first saved tab. If Explorer is opened for a specific folder (e.g. "Show in folder" or a folder shortcut), that folder and its selection are preserved and your saved tabs open alongside it.
- Fixes Sidebar Auto-Scrolling to the Bottom: Prevents File Explorer's Navigation Pane (
SysTreeView32) from jumping or flickering to the bottom when restoring tabs with Explorer Tab Utility.
- Persistent Session Protection: Opening File Explorer and closing it immediately without interacting with the restored tabs will no longer delete or lose your saved session.
- Atomic Multi-Tab Window Close: Ignores tabs belonging to a top-level Explorer window that is already in the middle of closing, preventing partial tab lists from overwriting your session when closing a multi-tab window.
- Per-User UTF-8 Session Storage: Stores sessions per Windows user account (
LastExplorerTabs-<SID>.txt) in UTF-8 so folder paths with accented or Unicode characters are preserved and multi-user accounts do not collide.
- Clean Mod Reload / Unload: Joins worker threads and unsubclasses controls deterministically on unload.
Notes
- Works independently of the built-in Windows feature "Restore previous folder windows at logon".
- Important: To restore tabs into a single File Explorer window, Explorer Tab Utility (with its "Window Hook" feature enabled) or a similar tab-merging utility is required. Otherwise, each tab will be restored in its own separate window.