tnodir / fort

Fort Firewall for Windows
GNU General Public License v3.0
1.11k stars 97 forks source link

windows explorer - file explorer (win 10+) #176

Closed b-user closed 6 months ago

b-user commented 6 months ago

Windows Explorer has a new name - It's called File Explorer in Windows 10 https://support.microsoft.com/en-us/windows/windows-explorer-has-a-new-name-c95f0e92-b1aa-76da-b994-36a7c7c413d7

windows explorer - file explorer

When migrating to Windows 10+, it's probably worth changing the wording in the interface.

Emi-Emi-Emi commented 6 months ago

I think the problem with this is that the 'context menu' is not talking about File Explorer, but about the Shell explorer.exe process, which is still called Windows Explorer, not the file manager.

Winrar calls it "shell integration'

Windows Task manager:

image

System Informer:

image

In any case, the wording I think should be "Windows context menu integration"

Also, for Win11, it would be nice if it was also integrated in the new Context Menu

Which can easily be done by using the exact registry values Fort already uses but changing from Shell\Fort Firewall to Shell\SetDesktopWallpaper

This is how Peazip did it. https://github.com/peazip/PeaZip/tree/sources/peazip-sources/res/share/batch/Windows/Windows%2011%20mini%20context%20menu

image

Of course by using SetDesktopWallpaper is the easy hacky way. But for example other menu items can be used as well, like pintohome and all that, the only difference is positioning in the menu and the icon it will use since it will just use the icon already made for those elements as shown in screenshot, or like for example, if pintostartscreen is used, it will replace the current Pin To Start when you right click an exe. This means wallpaper one is a good one for exe because you know there won't be a setdesktopwallpaper for an exe.

Seems like the only way to properly add this is with Windows complicated stuff, so it seems more complicated than what it needs to be for these kind of stuff.

https://blogs.windows.com/windowsdeveloper/2021/07/19/extending-the-context-menu-and-share-dialog-in-windows-11/

Apps extend the menu with IExplorerCommand + app identity. Unpackaged Win32 apps can use Sparse Manifests. IExplorerCommand support extends back to Windows 7.

BTW, since we have Wildcard in Programs, wouldn't be good if Fort Firewall also had the context menu for folders, and just open/added the directory path in the Edit Wildcard? All it needs to be added is \** in the path, so I guess "%1\**" in the command would be enough(?).

Also, what about if Edit Wildcard is opened, it won't show the Please close already opened Edit Program window and try again. message but will just add exe or directory path in the Wildcard text area?

If optional/user choice is wanted, then there can be a Shell integration (as winrar does) section in Options and then two checkbox one to add context menu for executables and another for folders.

b-user commented 6 months ago

I think the problem with this is that the 'context menu' is not talking about File Explorer, but about the Shell process, which is still called Windows Explorer, not the file manager.

In short, the shell is the taskbar, start menu, system tray, desktop. The context menu in your screenshot is ~the file manager menu~ I don't know the name of this.

The context menu is present not only in Explorer, but also in dialog boxes (sorry for the Cyrillic alphabet).

fm3- shell=far.exe ; explorer.exe is not present in task manager (in processes) In the file open menu (notepad) there is a context menu (with fort). If this sounds unconvincing, please forgive me.

I agree with the rest of your post. It would really be nice to add a new style context menu.

PS. My original post was meant to draw attention to the new title because it was new to me.

Emi-Emi-Emi commented 6 months ago

Yeah, it is still a Shell integration, that's what I said and you are pretty much agreeing with me, So I don't get the issue here, it is pretty common to call it so, winrar, xyplorer do it, because context menus are part of the shell.

The registry key for context menus is "shell" for the new and the legacy menu, and the reason why you are getting the same (legacy) Windows context menu's in File Picker/Dialogs as you do in other File Managers like Far or XYplorer or Xplorer2 and so on, which you are even showing screenshots of it.

You are the one who said File Explorer is the new name, and therefore Windows Explorer integration is not the right name to use for Win11, and (I guess) that it should be changed to File Explorer integration.

But when I talked about explorer.exe I didn't say explorer.exe is the only thing on Windows for the shell or UI, because I know explorer.exe can be terminated or replaced, and it can still function by the basic UI, like how you can get the 'new' file picker with libraries, home and all features and dark mode, and works and looks as the File Explorer, but doesn't depend or requires explorer.exe to work. Even Widows Recovery Environment / Windows installation, has the basic UI with nice file dialog, and nice icons and context menus and all, and it can be 'hacked' just the same because regedit exists there, so you can easily add context menu entries just the same, because registry is all that matters and these GUI are just displaying what the registry says with or without explorer.exe, so I know it.

But I still stand by saying how calling it "Windows explorer integration" is okay, at least it is understood what it might mean, since the explorer.exe is still called Windows Explorer, and only the file manager part of it is the one called File Explorer.

This is why I also went ahead and suggested the correct term or more accurate of "Windows context menu", because you still get features and menus without Windows Explorer = explorer.exe, and Windows Explorer Integration can still be a little vague on what it means.

But if I terminate explorer.exe and then use a program launcher like Flow Launcher or PowerToys Run, and open the File Explorer, that won't restore the taskbar or start menu or modern alt+tab or anything 'modern', unlike if you open explorer.exe. So, the file explorer can open and be independent as any other third-party file manager by starting as /factory,{00000000-0000-0000-0000-000000000000} -Embedding . So 'File Explorer' is just a part of explorer.exe, just as 'Desktop' is, and only because you get the new Win11 context menu in both places, doesn't mean they are the same, it just means new context menu is a Windows Explorer feature and explorer.exe was programmed to render whatever registry says, and this is why just changing Fort Firewall registry key to SetDesktopWallpaper immediately places Fort Firewall in both context menus, without any questions.

Anyway, this is the long explanation what I mean in the first paragraph of my comment. 👍