Change default location for Explorer opened via hotkey

6

3

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.

payo

Posted 2012-05-06T20:46:31.843

Reputation: 441

Using the registry. How to Change WinKey + E Shortcut Target in Windows 10?

– w32sh – 2016-12-26T04:01:32.893

Why not run a cmd file, like a batch file? – Marty Fried – 2012-05-06T20:50:34.913

Why would you want to do this? – cutrightjm – 2012-05-06T20:55:31.660

@MartyFried you mean, to remap win+r to my own path? Do you have a solution for that? – payo – 2012-05-06T21:08:31.537

@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 – 2012-05-06T21:10:05.483

@MartyFried I had a typo, which may have confused everyone, I meant win+e, not win+r – payo – 2012-05-06T21:12:29.473

Oh, ok, sorry I couldn't help. @ikaj, really? To map a command to run explorer with a path, like what he asked for, I thought at the time. Don't you know how to use them? – Marty Fried – 2012-05-06T23:42:33.263

Answers

4

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%

Peter Hahndorf

Posted 2012-05-06T20:46:31.843

Reputation: 10 677

to be honest, i was hoping this would amount to a regedit. This is a solution though, and for that I thank you. – payo – 2012-05-07T01:45:38.383

6

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.

Susanne

Posted 2012-05-06T20:46:31.843

Reputation: 61

Remove , /root and change your path to ::{59031a47-3f72-44a7-89c5-5595fe6b30ee} and you'll get explorer opening to your home dir which will also be treated as the root path in the address bar/breadcrumbs (tested in win10). I cannot comprehend how this is not the default behavior in 2017, let alone absent as a default-UI-supported option. And personally, I like having text commands I can use - I find them easier and certaingly faster than mucking with GUI navigation of the registry. – HonoredMule – 2017-04-27T17:23:17.107

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 – 2014-02-25T08:35:27.760

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 – 2014-02-25T08:44:36.997

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 – 2014-02-25T08:58:39.637

"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.'" -- http://support.microsoft.com/kb/271733/en-us

– Susanne – 2014-02-25T09:33:09.153

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 – 2014-02-25T09:38:30.553

The /root parameter seems to cause the following problem: the opened window does start at the specified location, but subsequent folder navigation opens a second window instead of using the current one. Removing the /root flag (including the coma, but not what is following) seems to solve this. – Cutter – 2014-04-23T02:13:18.103

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

AVB

Posted 2012-05-06T20:46:31.843

Reputation: 111

It is certainly an improvement to not open "Quick access". – Peter Mortensen – 2018-07-18T12:16:53.967

-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:
    

LaFeteParFete

Posted 2012-05-06T20:46:31.843

Reputation: 1