W11 22H2 Restore Classic File Explorer with Ribbon

Finally I found a tweak to restore the multifunction bar in file explorer in 22H2 b22621

I first performed the "sfc /scannow" test, which did not detect any error or file to restore, then I performed the "DISM.exe /Online /Cleanup-image /Restorehealth" test, this test also did not detect any error or file to restore.
So The applied tweak was not affected by these two tests.
So I assume it is immune to future updates as well.
Now I don't know how to apply it in the ISO or create a standalone executable file.
Any ideas?
thanks
 
Last edited:
ExplorerPatcher isn't a "tweak", it's a replacement for Start Menu/Explorer. Like most jailbreak programs, it uses DLL injection ("hijacking") to force StartMenuExperienceHost and Explorer through it's own routines. Hijacking doesn't require modifications to the original files.

In a nutshell, he's composing a replacement XAML (screen layout) and routing those apps through it.

While ExplorerPatcher's dev is credible, he's in the same position as nuhi. When Windows changes something, you're stuck waiting for him to re-release an updated Patcher. You would install it during Post-Setup.
 
UPDATE: Someone reported a new solution on the original post (same URL).

Instead of replacing ExplorerFrame.dll, you hard-link Explorer to a WinSxS copy and replace the default shell in the registry. You do have to repeat this process whenever CU gets applied.
 
Playing around, this regedit trick only works because Explorer checks on what filename is being called.
If you hard link the same WinSxS file as "C:\explorer.exe" or "C:\not_explorer.exe", and set the Shell registry to them -- it crashes repeatedly.

My feeling is it's exploiting a design bug, and the trick can't be used for other apps.

If you launch "explorer /separate", it's possible to get both versions (old & new ribbon) on the same desktop!

Windows 10 x64-2022-10-31-16-21-23.png
 
This PS script will update the reg key, and restart Explorer if needed. You can run this in Post-Setup, or live.

ExplorerRibbon-22H2.ps1
Code:
$Shell = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name Shell).Shell
$Target = ([string](Get-Item "C:\Windows\explorer.exe").Target).Split(":")[1]

if ($Shell -ne $Target) {
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name Shell -Value $Target

    $MyName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name

    if ((Get-Process explorer -IncludeUserName | Where-Object { $_.UserName -eq $MyName }).Count -gt 0) {
        & taskkill /f /fi "USERNAME eq $MyName" /im explorer.exe
        & $Target
    }
}
 
If any help - dont know if this is the reg, that does the trick - an you're using Home or Pro? If Pro i'm sure a GPO do it = Same Same.
I too - like an expanded menu :)
 

Attachments

  • ProceslinjeIndstil.reg
    4.2 KB
This PS script will update the reg key, and restart Explorer if needed. You can run this in Post-Setup, or live.

ExplorerRibbon-22H2.ps1
Code:
$Shell = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name Shell).Shell
$Target = ([string](Get-Item "C:\Windows\explorer.exe").Target).Split(":")[1]

if ($Shell -ne $Target) {
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\" -Name Shell -Value $Target

    $MyName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name

    if ((Get-Process explorer -IncludeUserName | Where-Object { $_.UserName -eq $MyName }).Count -gt 0) {
        & taskkill /f /fi "USERNAME eq $MyName" /im explorer.exe
        & $Target
    }
}
Thank you very much for this script works but with some limitations.
If I reset explorer the multifunction bar of W11 comes back, I have to restart the pc to have the multifunction bar of W10.
Also I wanted to ask how to start the PowerShell script with batch script, so I can put it in the ISO with RunOnceEx procedure.
 
I don't understand what your actions by "resetting" Explorer. The hack works because when Explorer launches, it checks how it was called and "explorer.exe" runs using the new UI (No Ribbon), and "C:\Windows\WinSxS\*explorer.exe" runs the old UI (Classic Ribbon).

Your options are:
1. Leave 22H2's default reg value untouched. Launch specific Explorer instances using a PS script I shared on ElevenForums. All other windows will stay ribbon-free as 22H2 intended.

2. Modify 22H2's reg value, so all Explorer windows have the Classic Ribbon.

To make everything fool proof, I've changed the workaround to an elevated logon task to check the current key, and force it if required.
If Explorer needs to be restarted, the taskbar will briefly flash during restart.

Every Explorer window will have the Classic Ribbon. If Windows resets the value, then logout and return.

Run this command in Post-Setup (Machine):
Code:
schtasks /create /sc ONLOGON /tn ClassicRibbon /tr "powershell -nop $P=\\\"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\\\"; $T=(gi \\\"C:\Windows\explorer.exe\\\").Target; if ((gpv $P -n Shell) -ne $T) {sp -path $P -n Shell -v $T -fo; spps -Name \"Explorer\" -f; start Explorer}" /ru SYSTEM /rl HIGHEST /f
 
I don't understand what your actions by "resetting" Explorer. The hack works because when Explorer launches, it checks how it was called and "explorer.exe" runs using the new UI (No Ribbon), and "C:\Windows\WinSxS\*explorer.exe" runs the old UI (Classic Ribbon).

Your options are:
1. Leave 22H2's default reg value untouched. Launch specific Explorer instances using a PS script I shared on ElevenForums. All other windows will stay ribbon-free as 22H2 intended.

2. Modify 22H2's reg value, so all Explorer windows have the Classic Ribbon.

To make everything fool proof, I've changed the workaround to an elevated logon task to check the current key, and force it if required.
If Explorer needs to be restarted, the taskbar will briefly flash during restart.

Every Explorer window will have the Classic Ribbon. If Windows resets the value, then logout and return.

Run this command in Post-Setup (Machine):
Code:
schtasks /create /sc ONLOGON /tn ClassicRibbon /tr "powershell -nop $P=\\\"HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\\\"; $S=gpv $P -n Shell; $T=(gi \\\"C:\Windows\explorer.exe\\\").Target; if ($S -ne $T) {sp -Path $P -n Shell -v $T -fo; spps -Name \"Explorer\" -f; start Explorer}" /ru SYSTEM /rl HIGHEST /f
Thank you for your answer and the help you are giving me.
I apologize if I mistranslated the answer, by "reset explorer" I mean when, for some needs, I do the direct command from prompt:
taskkill /IM explorer.exe /F start /wait explorer.exe
 
Last edited:
ExplorerPatcher works, but some users get annoyed when MS changes the UI and a newer version hasn't caught up.
 
Back
Top