2

As a follow-up to this question, is there any way at all to prevent Windows Explorer from using the User Folder in the Navigation Panel instead of the proper path?

On Windows 10, when you click on a Quick Access folder in Windows Explorer with "Expand to open folder" on, if the folder is within the user folder, instead of opening the folder in the file structure, it opens it within the User folder within the navigation pane.

I need to retain "Expand to open folder" as otherwise when you go up the tree you lose context and navigation options in the Navigation Pane.

Is the Navigation Pane completely broken on Windows 10? Why can't I use Quick Access to go to the real path? Why can't I remove the User Folder from the Navigation Pane once and for all?

2 Answers2

2

Okay, I've created two context menu options. The first is simpler --- just a registry edit. The only drawback is that it opens a new window rather than navigating in the existing one. The following can be copied & pasted into Notepad, saved as a .reg file, and merged into the registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenFSFolder]
@="Open file folder (new window)"

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenFSFolder\command]
@="explorer.exe \"%V\""

[HKEY_CLASSES_ROOT\Directory\shell\OpenFSFolder]
@="Open file folder (new window)"

[HKEY_CLASSES_ROOT\Directory\shell\OpenFSFolder\command]
@="explorer.exe \"%V\""

The second is a registry edit that depends on a PowerShell script. The upside is that it navigates within an open Explorer window --- ideal if you've just opened Explorer to Quick Access or This PC. The drawbacks are that you will see the flash of a PowerShell window and it's not "smart" if you have more than one Explorer window open --- no matter which window you launch it from, it will act on the most-recently opened window. The PowerShell script text is as follows:

Function GoTo-FSFolder {
   param (
    [Parameter(Mandatory=$true)][string]$FSpath
   )
   If ($ShellWindows = ((New-Object -ComObject Shell.Application).Windows()) | ?{$_.Name -match 'File Explorer'})
      { If (!($ShellWindows.Count))               # Only one Explorer window (no count property)
         {$ShellWindows.Navigate($FSpath)}
      Else {$ShellWindows[-1].Navigate($FSpath)}  # Count > 1: Use last opened window
   }
   Else {explorer $FSpath}                        # No Explorer windows open
}
GoTo-FSFolder $args[0]

This should be saved as "GoToFSFolder.ps1" in a folder of your choosing. Then the following registry edit should be applied:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\GoToFSFolder]
@="Go to file folder (PowerShell)"

[HKEY_CLASSES_ROOT\Directory\Background\shell\GoToFSFolder\command]
@="powershell.exe -nologo -NoProfile -WindowStyle Hidden -file \"C:\\Users\\keith\\Documents\\WindowsPowerShell\\GoToFSFolder.ps1\" \"%V\""

[HKEY_CLASSES_ROOT\Directory\shell\GoToFSFolder]
@="Go to file folder (PowerShell)"

[HKEY_CLASSES_ROOT\Directory\shell\GoToFSFolder\command]
@="powershell.exe -nologo -NoProfile -WindowStyle Hidden -file \"C:\\Users\\keith\\Documents\\WindowsPowerShell\\GoToFSFolder.ps1\" \"%V\""

The file paths in the command string should be edited to match the location where you saved "GoToFSFolder.ps1" --- this can be done before or after merging. Note that the .reg file command strings contain escaped characters: '\' (slash) and '\"' (double quotes). Once merged,

"powershell.exe -nologo -NoProfile -WindowStyle Hidden -file \"C:\\Users\\keith\\Documents\\WindowsPowerShell\\GoToFSFolder.ps1\" \"%V\""

becomes:

powershell.exe -nologo -NoProfile -WindowStyle Hidden -file "C:\Users\keith\Documents\WindowsPowerShell\GoToFSFolder.ps1" "%V"

so you might find it easier to edit through registry editor once merged. End result: Context Menu in Quick Access Navigates directly to: enter image description here

While not exactly what you want, I think these will ease your frustration.

Zip file with all files & undo files here: AddOpenFSFolder.zip

Keith

Keith Miller
  • 10,694
  • 1
  • 20
  • 35
1

I stumbled upon this post on my research, and since I found a solution, I wanted to share it. Sorry to dig this up, but it might help the next person with the same problem.
Found in : https://www.winhelponline.com/blog/show-full-path-explorer-address-bar-special-folders-windows-10/

Edit the reg: \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions{f3ce0f7c-4901-4acc-8648-d5d44b04ef8f}

Key: "ParsingName"
previous value: "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}"
new value: "-"

This removes the "shortened" name of the user's folder path. These exist for some folders like "Downloads", "Music", "Pictures" etc... Example: shortened desktop path

This Powershell code changes all the "shortened" paths. COMMENT THE ONES YOU WANT TO KEEP. :

$specialFolders = @(
    "754AC886-DF64-4CBA-86B5-F7FBF4FBCEF5", #Desktop
    "f42ee2d3-909f-4907-8871-4c22fc0bf756", #Documents
    "7d83ee9b-2244-4e70-b1f5-5393042af1e4", #Downloads
    "a0c69a99-21c8-4671-8703-7934162fcf1d", #Music
    "0ddd015d-b06c-45d5-8c4c-f59713854639", #Pictures
    "35286a68-3c57-41a1-bbb1-0eae73d76c95", #Videos
    "A52BBA46-E9E1-435f-B3D9-28DAA648C0F6", #OneDrive
    "f3ce0f7c-4901-4acc-8648-d5d44b04ef8f" #User profile path
)
foreach($specialFolder in $specialFolders){
    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{$specialFolder}" /v ParsingName /t REG_SZ /d - /f
}
 Stop-Process -processName: Explorer -force