Home Back

You can actually change the default File Explorer in Windows — here's how

xda-developers.com 2 days ago

Microsoft's File Explorer is far from a perfect solution for managing your files on Windows 11, but you're kind of stuck with it. While there are plenty of File Explorer alternatives, including some we've taken a look at here on XDA, Microsoft provides no easy way to replace the default handler for file management.

However, just because it's not easy, it doesn't mean it's not possible. By hacking the Windows Registry, you can force Windows to open folders and drives in a different app. It's not a perfect solution, but it does work for the most part.

Before you get started

Screenshot of OneCommander advanced settings with the option to replace File Explorer enabled

There are a couple of big things to note before you make the changes we're going to mention here. First of all, a few file managers such as OneCommander and TotalCommander already provide built-in options for replacing File Explorer. Essentially, those apps do the registry hacks for you, so the process is a lot more seamless this way. What's more, each app can support additional arguments for handling file management more naturally. For example, they can ensure that new folders are open in an existing window rather than opening a new one each time. As such, if you can, you should try to look for the option to replace File Explorer in the app you're currently using. The steps below are meant for apps that don't give you this option, or if you just want a more general solution that works for any app.

Screenshot of the Files app on Windows 11 with a green theme and a photo in the background
Related

The Files app is what I want the Windows 11 File Explorer to look like, but it's not quite perfect. It's also limited by Windows in some ways.

There are still some limitations with this hack, particularly dialogs like Save As or Open will still use the File Explorer design. You can't circumvent that.

You'll need to manually revert these changes to the Registry if you end up uninstalling the file manager app you're using. You won't be able to open any folders if you don't.

Hack the Windows Registry to change your default file manager

With the introduction out of the way, it's time to make changes to the Windows Registry if you want to change your default file manager. Here's what you need to do:

  1. Find the file location of the app you're trying to use as a file manager. For this example, we're using OneCommander, which is stored in C:\Program Files\OneCommander by default. However, this will vary depending on the program you're using. For most apps, the best way to find this information is to right-click the desktop or Start menu shortcut and choose Open file location.
  2. Right-click the EXE file for the app and select Copy as path.
    Screenshot of File Explorer with a context menu where the Copy as path option is highlighted
  3. Now, open the Start menu or Windows Search and search for regedit then select the first option (or press Enter).
  4. Once in the Registry Editor, use the left-side panel (or copy and paste the text below) to navigate to:
    HKEY_CLASSES_ROOT\Drive\shell
  5. Right-click the shell folder and choose New > Key.
    Screenshot of Registry Editor shwoing the option to create a new key inside the shell key
  1. Name the new key open.
  2. Right-click the open folder and, again, choose New > Key. Name this one command. The structure should look like this:
    Screenshot of Registry Editor showing the folder structure after creating the necessary keys to replace File Explorer
  3. Inside the new command folder, double-click the (Default) value to change its data.
  4. Enter the path you coped in step 2, followed by "%1". For our example with OneCommander, it will look like this:
    "C:\Program Files\OneCommander\OneCommander.exe" "%1"
    Screenshot of Registry Editor with a value set to open OneCommander when opening a folder
  5. Click OK.
  6. Now, navigate to this folder in Registry Editor:
    HKEY_CLASSES_ROOT\Directory\shell
  7. Repeat steps 5 through 10 to create the same folder structure with the same commands.
    Screenshot of Registry Editor showing the contents of the Directory folder after configuring it to open OneCommander instead of File Explorer

With these changes, the program of your choice will now handle opening any drive or directory instead of File Explorer. However, if you try to open File Explorer directly using a shortcut or by pressing Windows + E on your keyboard, it will still open File Explorer. That being said, when you click a folder inside File Explorer, it will then open it in the app you chose.

Reverting the changes

If you change our mind and want to go back to opening folders in File Explorer, simply delete the open folders you created in Registry Editor. Be sure to delete them from both the Directory and Drive parent folders.

Redirect the Windows + E keyboard shortcut

If you want to go all the way and also replace the app that opens when you press the Windows key + E on your keyboard, you can do that, too. There are a couple of ways you can do this, but the easiest one is to use AutoHotKey. Here's how it works:

  1. Download and install AutoHotKey from the official website.
  2. Open Notepad and enter the following text, replacing "C:\Program Files\OneCommander\OneCommander.exe" with the path for the program you want to use:
    #e::Run C:\Program Files\OneCommander\OneCommander.exe"
    ​​​​​​​
    Screenshot of Notepad displaying a script for AutoHotkey
  3. Click File > Save as.
  4. Set the Save as type setting to All files (*.*) and name the file something like FileManager.ahk (you can change the name, but you have to keep .ahk at the end).
    Screnshot of a Save As dialog with the file type set to All types and a file name ending in .ahk
  5. You can now double-click the file you create to run the script, though you'll see a message asking but you likely want it to be running all the time so the shortcut is always functional. For that, go to the location where you saved the AHK file and copy it.
  6. Navigate to this folder in your file manager:
    %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
  7. Paste the file in this location.
    Screenshots of File Explorer showing a AutoHotkey script stored in the Startup folder

Now, the script will run when your computer starts, so whenever you press Windows + E, you will be taken to the file manager of your choice.

It's not perfect, but it helps

With all of these steps, you can now use the file manager of your choice as your default file explorer in Windows 11 (or previous versions, too). It's not a perfect solution since some dialogs still rely on the File Explorer UI, but this already goes a long way in making the experience better. Hopefully Microsoft introduces a way to change the default file manager in Windows at some point.

People are also reading