frogSushi
New member
- Local time
- 9:02 PM
- Posts
- 9
- OS
- Windows 11 Entreprise N 64 bits 23H2
To summarize, the python shortcut patcher I posted yesterday fixes tree expansion when navigating within an existing Explorer window, but when you open a shortcut from the desktop or the taskbar, Explorer spawns a new window and the navigation pane defaults to Home instead of syncing to the target folder.
The fix is a small AutoHotkey v2 script that runs silently in the background. It hooks into Windows' own event system and reacts instantly whenever a new File Explorer window appears, automatically triggering the tree sync — no polling, no performance impact.
You can adjust the SEND_DELAY constant to your liking. On my machine, even 100ms seems to work fine.
Note: If you don't patch the shortcut with the shortcut patcher, the tree will still expand, but it will anchor to the parent library node (Documents, Downloads, Pictures, etc.) if there is one, rather than tracing the actual filesystem path — and the navigation pane won't follow when you navigate from there. This may or may not be an issue depending on your setup and expectations.
To run it automatically at Windows startup, two options:
The fix is a small AutoHotkey v2 script that runs silently in the background. It hooks into Windows' own event system and reacts instantly whenever a new File Explorer window appears, automatically triggering the tree sync — no polling, no performance impact.
You can adjust the SEND_DELAY constant to your liking. On my machine, even 100ms seems to work fine.
Note: If you don't patch the shortcut with the shortcut patcher, the tree will still expand, but it will anchor to the parent library node (Documents, Downloads, Pictures, etc.) if there is one, rather than tracing the actual filesystem path — and the navigation pane won't follow when you navigate from there. This may or may not be an issue depending on your setup and expectations.
To run it automatically at Windows startup, two options:
- Add it to the startup folder
- Create a scheduled task set to trigger at logon
Attachments
My Computer
System One
-
- OS
- Windows 11 Entreprise N 64 bits 23H2
- Computer type
- PC/Desktop
- Manufacturer/Model
- Custom
- CPU
- AMD Ryzen 5 5600 6-Core Processor 3.50 Ghz
- Memory
- 32 Gb




