ueli icon indicating copy to clipboard operation
ueli copied to clipboard

Ueli not respecting default file manager

Open WiredFire opened this issue 3 years ago • 5 comments

Preconditions:

  • Ueli installed and active
  • OS: Windows 10

Steps to recreate:

  1. Install an alternative file manager, in this case Explorer++, https://explorerplusplus.com/
  2. Set alternative file manager as the default Windows file manager
  3. Confirm default settings have taken place by opening "Computer" from Windows Start menu and verify that the alternative file manager was opened as the defauly
  4. Trigger Ueli then search for a folder. Activate folder search result
  5. Ueli result is opened in Windows File Manager, not the system default alternative launcher.

WiredFire avatar Sep 16 '21 09:09 WiredFire

ueli just calls Electron's electron.shell.showItemInFolder, so you should open an issue for Electron and link it here. I've checked and no one reported it so far.

Also, I didn't know you can set a default file manager on Windows, can you clarify how you did it? I couldn't find anything in Explorer++'s docs.

NotWearingPants avatar Oct 01 '21 04:10 NotWearingPants

Explorer++ has the option to set itself as the default file manager from Tools > Options, then there's a "Default File Manager" section on the window that opens.

image

WiredFire avatar Oct 09 '21 12:10 WiredFire

I've investigated this, and the way Explorer++ sets itself as default is to first add a context menu entry for folders called Open In Explorer++ the same way VSCode or Sublime do it, by setting the following registry values:

HKEY_CURRENT_USER\Software\Classes\Directory\shell\openinexplorer++\(Default) = 'Open In Explorer++'
HKEY_CURRENT_USER\Software\Classes\Directory\shell\openinexplorer++\command\(Default) = '"path/to/explorer.exe" "%1"'

And then to make this action the default action when you double-click a folder, it sets:

HKEY_CURRENT_USER\Software\Classes\Directory\shell\(Default) = 'openinexplorer++'

This is when you select Replace Explorer for filesystem folders. For Replace Explorer for all folders it does the same things but under the Folder class instead of Directory. I'm not sure what items this affects other than directories.

* (the name (Default) refers to the default value entry of a registry key, has nothing to do with 'setting as default')


To open a selected folder ueli uses electron.shell.openPath. To open the location of a file ueli uses electron.shell.showItemInFolder. And finally to open a folder as administrator ueli runs the command powershell -Command "& {Start-Process -Verb runas '${path}'}".

electron.shell.openPath - Does not respect the default directory action electron.shell.showItemInFolder - Does respect the default direction action powershell ... - Throws an error for almost any filetype, including directories, but I don't think it's relevant that much here


So to summarize, the bug is only with electron.shell.openPath. I'll open an issue for Electron 👌

NotWearingPants avatar Oct 10 '21 21:10 NotWearingPants

Thank a lot for looking into that - appreciate it! 😊 I’ll assume this issue can be closed given it’s upstream with electron. Thanks again 😊

WiredFire avatar Oct 11 '21 06:10 WiredFire

"Ctrl o | Open the selected program or file at it's location "

Anyone know if there is a solution to have Total Commander as "File Explorer" ?

Would be great, i love UELI and Total Commander.

tomaskall avatar Aug 24 '22 11:08 tomaskall