How to setup Windows File Explorer to automatically open locations with custom “aliases” in the Address Bar (like “desktop” or “program files”)?

Welcome to Programming Tutorial official website. Today - we are going to cover how to solve / find the solution of this error How to setup Windows File Explorer to automatically open locations with custom “aliases” in the Address Bar (like “desktop” or “program files”)? on this date .

I am trying to automate our project’s directory and I thought that setting up aliases could help a lot. They need to be accessible from anywhere and, ideally from the Windows File Explorer Address Bar. I see that some just typing names of some common directories like “desktop” or “program files” doesn’t need some “shell:Desktop” or “%Desktop%” special formats, which helps a lot. But how is that set up? Are those folders hard-coded to be accessible this way? Is it Windows Index, some special env var?

And most importantly can it be changed from “userspace”?

Do Group Policies have such a “feature”? Puppet/Ansible/Chef…?

EDIT: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerUser Shell Folders does NOT work. I think they only take “shell:xxx” format


I think there are two categories of folders that can be accessed by simply typing their name in the Address bar. A few System folders seem to be hard-coded:

  • Program Files
  • System32

When either of these folder names are typed in the Address bar, the corresponding file system location opens:

enter image description here

But when you type “Desktop”, it’s not This PC > Deskop or This PC > Windows (C:) > Users >UserName> Desktop (two different Namespace paths that refeence the same file system folder) that opens, but rather the Virtual Desktop, which is the root of the Shell Namespace. It’s an aggregate of two file system locations:

  • shell:ThisPCDesktopFolder
  • shell:Common Desktop

and two registry keys:

  • HKCUSOFTWAREMicrosoftWindowsCurrentVersionExplorerDesktopNameSpace
  • HKLMSOFTWAREMicrosoftWindowsCurrentVersionExplorerDesktopNameSpace

where junctions to file system locations ( OneDrive, shell:UsersFilesFolder) as well as virtual folders such as Network, Control Panel, and Libraries are added. The easiest way to view all sub-folders of the Desktop is the DropList displayed when you click the leftmost breadcrumb control in the Address bar:

enter image description here

Any name you find in this list can be typed in the Address bar without any special syntax. So any folder located in either of the two “Desktop” folders gains this functionality. With all of these values, there’s nothing mysterious — as top-level sub-folders, the folder name is also the fully-qualified namespace path.

In addition to the immediate sub-folders of the Desktop, it appears this functionality is also granted to the locations found under This PC: User folders, Devices and drives, and Network Locations can all be directly accessed by typing the container name in the Address bar. While adding folders that appear alongside the default user folders is possible, it’s somewhat labor-intensive, requiring creation of a GUID and multiple registry keys for each folder you create. The Network Location functionality is much easier. Although the Add Network Location wizard will balk if you try to enter a local path, you can bypass the wizard. Any item ( folder, file, shortcut ) present in the folder accessed via shell:NetHood will appear in the Network Locations group:

enter image description here

enter image description here