9

My searching has only shown me how to change various shortcuts for Windows Explorer to open specific locations. While learning the command line options for explorer.exe is beneficial, I'm trying to change where Windows Explorer opens when opening it by hitting Windows + E (the shortcut)-

This Super User question was particularly informative on the subject, but again - for shortcuts, not when using the global hotkey.

Why do I want this? Windows + E is by far my favorite; why to open Window's explorer? But, most of the time I want to see my userdir. Also, I detest the favorites, libraries, and desktop/user directory shown (Why? because they don't represent the filesystem), it should only be computer/* <- This I've done. I want Windows + E to open to be {install_drive}/users/{user}, e.g. c:/users/payo.

7
  • Why not run a cmd file, like a batch file? May 6, 2012 at 20:50
  • Why would you want to do this?
    – cutrightjm
    May 6, 2012 at 20:55
  • @MartyFried you mean, to remap win+r to my own path? Do you have a solution for that?
    – payo
    May 6, 2012 at 21:08
  • @ekaj because I prefer it go to my custom path, it seems like something I should be able to do. Should I concoct a more legitimate justification that this for my question than simply, "because i want to, that's why"?
    – payo
    May 6, 2012 at 21:10
  • @MartyFried I had a typo, which may have confused everyone, I meant win+e, not win+r
    – payo
    May 6, 2012 at 21:12

4 Answers 4

5

LikeHacker has an article entitled: 'Make Win+E Open the Folder of Your Choice'

It uses AutoHotKey which is a very helpful tool if you like to use your keyboard.

The line that works for me in the Autohotkey.ahk file is:

#e::Run, explore %USERPROFILE%
2
  • to be honest, i was hoping this would amount to a regedit. This is a solution though, and for that I thank you.
    – payo
    May 7, 2012 at 1:45
  • Small downside of this solution is that it doesn't change the behaviour of clicking Explorer in your taskbar. It's more of a "slap a plaster on top" kind of solution, whereas @Susanne's registry mod is more of a "rewire the circuit" method. But at the end of the day it's your computer so do what you want.
    – cyqsimon
    Jul 6, 2021 at 19:47
9

On Windows 7, it works this way:

  1. Open regedit, and navigate to:

    HKEY_CLASSES_ROOT\Folder\shell\opennewwindow
    
  2. Rename the sub-key command to command.old, because we can't use it. (Its default value type is REG_SZ and we need a REG_EXPAND_SZ.)

  3. Open a Command Prompt window (cmd) as Administrator, to create a new key with a default value type REG_EXPAND_SZ. (This is not possible via regedit.)

  4. Type the following line and change C:\your\folder to your needs. Press Enter.

    reg add HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command /ve /t REG_EXPAND_SZ /d "%SystemRoot%\explorer.exe /root, C:\your\folder"
    
  5. Press Win+E and Explorer opens at C:\your\folder.

8
  • Why not just create a new key directly in Registry Editor GUI for steps 3 and 4? Instructions should preferably take the easier route of simply clicking a few things on a GUI. Advanced users (terminal-buffs) will be smart enough to convert them into commands or scripts but novices should not be expected to meddle with command prompts and not mess up.
    – ADTC
    Feb 25, 2014 at 8:35
  • It's not possible to use the Registry Editor GUI to create a key with a default value type REG_EXPAND_SZ. So you have to take the way via a command line.
    – Susanne
    Feb 25, 2014 at 8:44
  • Wow, that is strange. REG_SZ doesn't work for this tip at all while REG_EXPAND_SZ works. What is the reason? Btw, it could also be %windir%\explorer.exe; that's what I used instead of %SystemRoot%\explorer.exe.
    – ADTC
    Feb 25, 2014 at 8:58
  • "According to the Microsoft Developer's Network (MSDN), the REG_EXPAND_SZ registry value is 'a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions.'" -- support.microsoft.com/kb/271733/en-us
    – Susanne
    Feb 25, 2014 at 9:33
  • If that is the case, then shouldn't the expanded form in REG_SZ work? But it doesn't. Besides I have used environment variables in other registry hacks without having to change to REG_EXPAND_SZ so I think this goes deeper than that. Anyway, good to know. Always learning something!
    – ADTC
    Feb 25, 2014 at 9:38
1

I did it this way to change to My Computer. (Not a custom location)

I'm using Windows 10 Redstone.

Windows Key + E location

1
  • It is certainly an improvement to not open "Quick access". Jul 18, 2018 at 12:16
-1
  • Right click on folder on taskbar,
  • Right click on Explorer
  • Choose: Properties
  • Paste this:

    "%windir%\explorer.exe " /e,c:
    

    or this

    "%windir%\explorer.exe " /e,d:
    
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .