Restore Classic File Explorer with Ribbon in Windows 11


  • Staff
File_Explorer_banner.png

This tutorial will show you how to restore the classic File Explorer with Ribbon for your account or all users in Windows 11.

File Explorer in Windows 10 has a ribbon, tabs, and a title bar with color. The ribbon includes common tasks, such as copying and moving, creating new folders, emailing and zipping items, and changing the view. The tabs change to show extra tasks that apply to the selected item. You can hide or show the ribbon on demand.

In Windows 11, Microsoft made File Explorer modern with a clean look and brand-new command bar instead of the ribbon.

If you prefer, you can restore the classic File Explorer with ribbon in Windows 11.


Contents

  • Option One: Temporarily Open File Explorer with Ribbon
  • Option Two: Create Shortcut to Always Open File Explorer with Ribbon
  • Option Three: Restore Classic File Explorer with Ribbon for Current User using REG file (Works in 23H2+)
  • Option Four: Restore Classic File Explorer with Ribbon for All Users using REG file (No longer works in 22H2+)
  • Option Five: Enable or Disable File Explorer Command Bar for Current User using REG file (No longer works in 22H2+)
  • Option Six: Enable or Disable File Explorer Command Bar for Current User using Command (No longer works in 22H2+)


EXAMPLE: File Explorer with command bar and ribbon in Windows 11

File_Explorer_with_command_bar.png
File_Explorer_with_ribbon.png





Option One

Temporarily Open File Explorer with Ribbon


This option will open a File Explorer window with the ribbon.

You will be able to browse and navigate in this File Explorer window with a ribbon only for as long as this window is open.


1 Open the Control Panel.

2 Perform one of the following actions depending on which Control Panel view is used: (see screenshots below)
  • If using small icons view, click/tap twice on the Up arrow.
  • If using large icons view, click/tap twice on the Up arrow.
  • If using category view, click/tap once on the Up arrow.
Control_Panel_small_icons_view.png
Control_Panel_large_icons_view.png
Control_Panel_category_view.png

3 You will now have a File Explorer window with the ribbon open. (see screenshot below)

File_Explorer_window_with_ribbon.png





Option Two

Create Shortcut to Always Open File Explorer with Ribbon


You can Pin to Taskbar, Pin to Start, add to Start menu All apps, add to Win+X menu, assign a keyboard shortcut to, or move this shortcut to where you like for easy usage.


If there's a folder or location you want File Explorer to open to by default that's not listed below, then please post a request for it. I'll be happy to add it to the shortcut list below for you.


The shortcut commands below will only work with an English language installation. If you use a different language, then please post a request for a translated version of the shortcut command you want to use. "Control Panel" and the folder name (ex: "Desktop") in the command needs to be translated for your language instead.



1 Create a new shortcut using the command below for the path you want:

Open File Explorer to Desktop with Ribbon
powershell.exe -nop -ep bypass -c "& {"Start-Process \"Control\"; $wshell = New-Object -ComObject wscript.shell; $null = $wshell.AppActivate(\"Control Panel\"); Start-Sleep 0.75; $wshell.SendKeys("'""^"lDesktop~"'")}"

OR

Open File Explorer to Home with Ribbon
powershell.exe -nop -ep bypass -c "& {"Start-Process \"Control\"; $wshell = New-Object -ComObject wscript.shell; $null = $wshell.AppActivate(\"Control Panel\"); Start-Sleep 0.75; $wshell.SendKeys("'""^"lHome~"'")}"

OR

Open File Explorer to OneDrive with Ribbon
powershell.exe -nop -ep bypass -c "& {"Start-Process \"Control\"; $wshell = New-Object -ComObject wscript.shell; $null = $wshell.AppActivate(\"Control Panel\"); Start-Sleep 0.75; $wshell.SendKeys("'""^"lShell:OneDrive~"'")}"

OR

Open File Explorer to This PC with Ribbon
powershell.exe -nop -ep bypass -c "& {"Start-Process \"Control\"; $wshell = New-Object -ComObject wscript.shell; $null = $wshell.AppActivate(\"Control Panel\"); Start-Sleep 0.75; $wshell.SendKeys("'""^"lThis PC~"'")}"




Option Three

Restore Classic File Explorer with Ribbon for Current User using REG file


This option will only work on Windows 11 version 23H2 and higher.


1 Do step 2 (classic) or step 3 (default - undo) below for what you would like to do.


 2. Restore Classic File Explorer with Ribbon for Current User

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Restore_classic_File_Explorer_with_ribbon_for_current_user.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\CLSID\{2aa9162e-c906-4dd9-ad0b-3d24a8eef5a0}]
@="CLSID_ItemsViewAdapter"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{2aa9162e-c906-4dd9-ad0b-3d24a8eef5a0}\InProcServer32]
@="C:\\Windows\\System32\\Windows.UI.FileExplorer.dll_"
"ThreadingModel"="Apartment"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{6480100b-5a83-4d1e-9f69-8ae5a88e9a33}]
@="File Explorer Xaml Island View Adapter"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{6480100b-5a83-4d1e-9f69-8ae5a88e9a33}\InProcServer32]
@="C:\\Windows\\System32\\Windows.UI.FileExplorer.dll_"
"ThreadingModel"="Apartment"

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\ShellBrowser]
"ITBar7Layout"=hex:13,00,00,00,00,00,00,00,00,00,00,00,20,00,00,00,10,00,01,00,\
  00,00,00,00,01,00,00,00,01,07,00,00,5e,01,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00


 3. Restore Modern File Explorer with Command Bar and Tabs for Current User

This is the default setting to undo step 2.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Default_modern_File_Explorer_with_command_bar_for_current_user.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\CLSID\{2aa9162e-c906-4dd9-ad0b-3d24a8eef5a0}]

[-HKEY_CURRENT_USER\Software\Classes\CLSID\{6480100b-5a83-4d1e-9f69-8ae5a88e9a33}]

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Either restart the explorer process, sign out and sign in, or restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.




Option Four

Restore Classic File Explorer with Ribbon for All Users using REG file


You must be signed in as an administrator to use this option.


This option will no longer work on Windows 11 version 22H2 and higher.


1 Do step 2 (classic) or step 3 (default - undo) below for what you would like to do.

2 Restore Classic File Explorer with Ribbon

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Restore_classic_File_Explorer_with_ribbon.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
"{e2bf9676-5f8f-435c-97eb-11607a5bedf7}"=-

3 Restore Modern File Explorer with Command Bar

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Default_modern_File_Explorer_with_command_bar.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked]
"{e2bf9676-5f8f-435c-97eb-11607a5bedf7}"=""

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Sign out and sign in or restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.




Option Five

Enable or Disable File Explorer Command Bar for Current User using REG file


This option will no longer work on Windows 11 version 22H2 and higher.


1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.


 2. To Enable File Explorer Command Bar

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Enable_File_Explorer_command_bar.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}]


 3. To Disable File Explorer Command Bar

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Disable_File_Explorer_command_bar.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32]
@=""

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 Either restart the explorer process, sign out and sign in, or restart the computer to apply.

8 You can now delete the downloaded .reg file if you like.




Option Six

Enable or Disable File Explorer Command Bar for Current User using Command


This option will no longer work on Windows 11 version 22H2 and higher.


1 Open Windows Terminal, and select Windows PowerShell or Command Prompt.

2 Copy and paste the command below you want into Windows Terminal, and press Enter.

(Disable)​
reg add "HKCU\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32" /f /ve

OR​

(Enable - default)​
reg delete "HKCU\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}" /f

3 Close Windows Terminal.

4 Either restart the explorer process, sign out and sign in, or restart the computer to apply.


That's it,
Shawn Brink


 

Attachments

  • File_Explorer.png
    File_Explorer.png
    5.6 KB · Views: 255
  • Default_modern_File_Explorer_with_command_bar.reg
    680 bytes · Views: 535
  • Restore_classic_File_Explorer_with_ribbon.reg
    682 bytes · Views: 412
  • Disable_File_Explorer_command_bar.reg
    634 bytes · Views: 252
  • Enable_File_Explorer_command_bar.reg
    590 bytes · Views: 220
  • Default_modern_File_Explorer_with_command_bar_for_current_user.reg
    748 bytes · Views: 24
  • Restore_classic_File_Explorer_with_ribbon_for_current_user.reg
    5.4 KB · Views: 10
Last edited:
since what we're doing here is we're making our own .exe to reinvent the wheel, the whole argument of not wanting to use 3rd party code is already 150% moot anyway in the first place. So...
There's a big difference between using a tiny exe that just runs a command and sends a few keystrokes versus something that messes with Windows system files. ExplorerPatcher definitely comes with risk (I've had it cause Explorer crash loops on more than one occasion). StartAllBack seems to be safer (if I understand correctly, it works in memory and does not change files), but I'm sure it has potential risks as well.

Having said that, I think the typical target for the launcher are users on managed PCs that cannot install something like ExplorerPatcher or StartAllBack. For example, some of the users in that category need to use the offline files and folders feature which does not work with the new Explorer.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
thanks for your great work, works perfect.
maybe a little bit slow, is there a way to speed it up a few milliseconds?
Can you elaborate? Is it slower than the PowerShell script you've been using?

I tested the code from @hdmi and could not measure any significant speed difference, but please let me know if you do.

Getting to the Windows Tools screen is just the command control admintools, so that part is very fast. Then the code has to find the correct window. To make it language agnostic, I'm finding the window with the correct "command line". That requires using WMI, which may be the source of a delay, but I didn't notice any difference from the previous version that found the window by name. I'll run a few tests and double-check that. Getting the window handle of the process is fast, but the issue then is for that window to be ready to receive input. There really isn't any way to check that. It requires a pause, which can be very short if an old Explorer window is already open, but must be a about 200ms longer if not. Even with the current pause, you may see that it sometimes fails to populate the target path when used immediately after logging in.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
I think I read a few month ago, a windows-update changed something on explorer.exe and so the explorerpatcher crashed and windows was unusable. So I want a "parallel" solution,
I always keep my Windows 11 fully up to date, also including all my drivers, and have been running ExplorerPatcher on it since about a week after Windows 11 was officially released. I haven't experienced a crash that made Windows 11 completely unusable. At worst, after a Windows update had been installed the explorer.exe failed to load during Windows startup resulting in a black screen with only a mouse cursor, but each time when this happened it was still possible to open Task Manager by pressing Ctrl+Shift+Esc so, in there, I could still click on Run new task, then enter the command to uninstall ExplorerPatcher:
%programfiles%\ExplorerPatcher\ep_setup /uninstall
After that, I have always been able to easily get it fixed again. Always. As in, for the past 2 years and still counting.
@hdmi, where do I have to add the "This PC" start path, in your script?
You don't, as it navigates to This PC already by default. Also, it is not a script... it is a program written in C#, and that you can compile to an .exe file (by running the batchfile).
 
Last edited:

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
There's a big difference between using a tiny exe that just runs a command and sends a few keystrokes versus something that messes with Windows system files.
ExplorerPatcher does not modify any system files. It only stores some of its settings in the Windows registry.
ExplorerPatcher definitely comes with risk (I've had it cause Explorer crash loops on more than one occasion).
See my above reply to @DerNetzreporter. I have been using it for 2 whole years and still counting. Not once has it caused my Windows 11 to become unusable. To the contrary, I find that ExplorerPatcher is what actually stops Windows 11 from being unusable. This is not a joke. Microsoft is the only joke, which is completely obvious.
StartAllBack seems to be safer (if I understand correctly, it works in memory and does not change files), but I'm sure it has potential risks as well.
You are seeing ghosts. Again, ExplorerPatcher does not modify any system files. Do yourself a favor. Stop reading posts from people who made it their personal hobby to keep spreading all sorts of misinformation on here.
Having said that, I think the typical target for the launcher are users on managed PCs that cannot install something like ExplorerPatcher or StartAllBack. For example, some of the users in that category need to use the offline files and folders feature which does not work with the new Explorer.
If they don't have permission to install something, yet they do have permission to run a 3rd party .exe that they got from the internet, then IMO they should be complaining to their boss about that or maybe they should be looking for a better job IMO. But I posted my C# code anyway, because I wanted to help. It's just that I don't intend to waste much of my time with it anymore now. Everyone can feel free to modify and/or improve it theirself or do with it whatever it is they want, and, everything that it currently does has already been documented by Microsoft.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
and could not measure any significant speed difference,
When it uses the SendKeys method, if the folderpath in question is a tad longer than "average" I can actually see it getting "typed" (so to speak) in the address bar, character by character.
Then the code has to find the correct window. To make it language agnostic, I'm finding the window with the correct "command line". That requires using WMI, which may be the source of a delay,
My version only looks for a window that opens after the code runs. So, it ignores any window that was already open before the code was run. In addition to this, my version does not just check the window title, as it also verifies that the window does indeed belong to the explorer process, just as an added precaution.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
When it uses the SendKeys method, if the folderpath in question is a tad longer than "average" I can actually see it getting "typed" (so to speak) in the address bar, character by character.

My version only looks for a window that opens after the code runs. So, it ignores any window that was already open before the code was run. In addition to this, my version does not just check the window title, as it also verifies that the window does indeed belong to the explorer process, just as an added precaution.
The slow typing speed would only occur in my current version if the clipboard method is disabled with /x, so I think @DerNetzreporter is looking at other points where there may be a tenth of a second or two that could be improved.

I'll take another look at your version. I'll see if I can solve the issue of it opening up a new Explorer window for paths within the user's folder, but I have to get my head around some of the code.

P.S. Thanks for the clarification on ExplorerPatcher. Based on my own experiences with it, I still would not be comfortable recommending it to a non-technical user, as they may not know how to recover using Task Manager. It seems fine for most members here.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
You don't, as it navigates to This PC already by default. Also, it is not a script... it is a program written in C#, and that you can compile to an .exe file (by running the batchfile).
your batch created a new exe (file without specific icon symbol) but it starts
"Systemsteuerung\Alle Systemsteuerungselemente\Windows-Tools"
I created a file OldExplorer.cs with your code and a test.bat file with the other code. Result is the described exe.
 

My Computer

System One

  • OS
    Win 11
Based on my own experiences with it, I still would not be comfortable recommending it to a non-technical user, as they may not know how to recover using Task Manager.
If a non-technical user still doesn't know how to do it, then this non-technical user can always come back on here, and then I will re-explain it of course... :yawn:
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
your batch created a new exe (file without specific icon symbol) but it starts
"Systemsteuerung\Alle Systemsteuerungselemente\Windows-Tools"
That's just because, on English Windows or Dutch Windows, there is no hyphen in the Windows Tools window title. @LesFerch recently found a fix to that problem in his version it would seem. See:
https://www.elevenforum.com/t/resto...rer-with-ribbon-in-windows-11.620/post-359480
I created a file OldExplorer.cs with your code and a test.bat file with the other code. Result is the described exe.
Yes, but unfortunately right now it has a few problems that still need to be fixed.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
If a non-technical user still doesn't know how to do it, then this non-technical user can always come back on here, and then I will re-explain it of course... :yawn:
You are too kind. :-)
But I'm talking about users that wouldn't be members here and would struggle to do a search that would bring them here. :wink:
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
You are too kind. :-)
But I'm talking about users that wouldn't be members here and would struggle to do a search that would bring them here. :wink:
Then just tell them to type elevenforum in the address bar of their browser and press Ctrl+Enter. lol :p
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Try it like this:
Code:
using System;
using System.Diagnostics;
using System.IO;
using System.Management;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Automation;
using System.Windows.Forms;

class Program
{
    private static string Folder = "";
    private static IntPtr fld;
    private static uint psfgaoOut;

    private static void OnWindowOpened(object src, AutomationEventArgs e)
    {
        try
        {
            var elem = src as AutomationElement;
            Process proc = Process.GetProcessById(elem.Current.ProcessId);
            if (elem != null && GetCommandLine(proc.Id).Equals(
                "C:\\WINDOWS\\explorer.exe /factory,{5BD95610-9434-43c2-886c-57852CC8A120} -Embedding", StringComparison.OrdinalIgnoreCase))
            {
                WindowPattern windowPattern = null;
                windowPattern = elem.GetCurrentPattern(WindowPattern.Pattern) as WindowPattern;
                if (windowPattern.WaitForInputIdle(4000))
                {
                    Thread.Sleep(200);
                    SetForegroundWindow((IntPtr)elem.Current.NativeWindowHandle);
                    Thread.Sleep(250);
                    if (Folder != "")
                    {
                        if (fld != IntPtr.Zero)
                        {
                            SendKeys.SendWait("^{l}\\{Enter}");
                            SHOpenFolderAndSelectItems(fld, 0, new IntPtr[] {}, 0);
                            SendKeys.SendWait("{Enter}");
                            if (Folder.ToLower().StartsWith("c:\\users\\"))
                            {
                                Thread.Sleep(250);
                                SendMessage((IntPtr)elem.Current.NativeWindowHandle, 0x0010, IntPtr.Zero, IntPtr.Zero);
                            }
                        }
                        else
                        {
                            SendKeys.SendWait("^{l}" + Folder + "{Enter}");
                        }
                    }
                    else
                    {
                        SendKeys.SendWait("^{l}\\{Enter}");
                    }
                }
            }
        }
        catch
        {
            Process.GetCurrentProcess().Kill();
        }
    }

    static string GetCommandLine(int processId)
    {
        using (ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + processId))
        using (ManagementObjectCollection moc = mos.Get())
        {
            foreach (ManagementBaseObject mo in moc)
            {
                if (mo != null && mo["CommandLine"] != null)
                {
                    return mo["CommandLine"].ToString();
                }
            }
        }
        return null;
    }

    [STAThread]
    static void Main(string[] args)
    {
        if (args.Length > 0)
        {
            Folder = args[0].TrimEnd(new [] {'\\', '\"'}).TrimStart(new [] {'\"'});
            if (Folder.EndsWith(":"))
            {
                Folder = Folder + "\\";
            }

            try
            {
                if (new DirectoryInfo(Folder).Parent != null)
                {
                    SHParseDisplayName(Path.GetFullPath(Folder), IntPtr.Zero, out fld, 0, out psfgaoOut);
                    if (fld == IntPtr.Zero)
                    {
                        Process.GetCurrentProcess().Kill();
                    }
                }
            }
            catch
            {
            }
        }

        System.Windows.Automation.Automation.AddAutomationEventHandler(
            WindowPattern.WindowOpenedEvent,
            AutomationElement.RootElement,
            TreeScope.Children,
            OnWindowOpened);

        ProcessStartInfo startInfo = new ProcessStartInfo
        {
            FileName = "control.exe",
            Arguments = "admintools",
            RedirectStandardOutput = false,
            RedirectStandardError = false,
            UseShellExecute = true,
            CreateNoWindow = false
        };

        Process process = new Process
        {
            StartInfo = startInfo
        };

        process.Start();

        // Wait
        Thread.Sleep(10000);
    }
    [DllImport("user32.dll")]
    private static extern bool SetForegroundWindow(IntPtr hWnd);

    [DllImport("shell32.dll")]
    private static extern int SHOpenFolderAndSelectItems(IntPtr pidlFolder, uint cidl, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] apidl, uint dwFlags);

    [DllImport("shell32.dll")]
    private static extern void SHParseDisplayName([MarshalAs(UnmanagedType.LPWStr)] string name, IntPtr bindingContext, out IntPtr pidl, uint sfgaoIn, out uint psfgaoOut);

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    private static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);
}
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Thanks. I just tested your latest code. I see you added a check to close the original window when the path starts with C:\Users, but, unfortunately, the second window opens in the new Explorer. To avoid the issue, I suppose I could fall back to sendkeys (string or clipboard) when it's a user folder. And I wonder if there could be other exceptions. I'll keep poking at it.
 

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Hello,

I'm new here and i am happy with this forum! I got only a question. Is there a solution for points 3, 4 and 5? I like .bat files.

Thanks a lot

greats
 

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
To set the old Explorer as the default, you have to use a third party patching tool such as ExplorerPatcher or StartAllBack (select "Kinda 10" mode).
Thank you for your answer but the programs be change something in the register i think. Or not? If that taught there must an other way without a program. You know what i mean?
 

My Computer

System One

  • OS
    windows 11
    Computer type
    PC/Desktop
Thank you for your answer but the programs be change something in the register i think. Or not? If that taught there must an other way without a program. You know what i mean?
I did some registry monitoring while switching StartAllBack's Explorer option between "Proper 11" and "Kinda 10" and only saw registry entries related to StartAllBack (and the usual Windows noise of course). So, I guess StartAllBack, and other similar tools, do something on the fly. Maybe code injection? I dunno.

Note that, whether you're running the old or new Explorer on Windows 11, it's the same explorer.exe. The difference appears to be in the DLLs that it loads. For now, the only known way to launch the old Explorer is via Control Panel, which is what my little launcher does:

 
Last edited:

My Computer

System One

  • OS
    Windows 10/11
    Computer type
    Laptop
    Manufacturer/Model
    Acer
Back
Top Bottom