microsoft / winfile

Original Windows File Manager (winfile) with enhancements
MIT License
6.82k stars 706 forks source link

Do not show the permissions icon in the taskbar on new installations #324

Closed schinagl closed 2 years ago

schinagl commented 2 years ago

Do not show the 'permissions' icon in the taskbar with this branch, because it is not available with W7++ anymore.

The coding is still in, because other branches which might target W2K & WXP do have the functionality

malxau-msft commented 2 years ago

Philosophically, I think we should try to allow older systems to use the code in this tree, but that's different to keeping code alive in the tree that can't work on newer systems.

For this specific case though, looking now, I think the "new" APIs are in aclui.dll. See EditSecurity and friends. There'd still be a lot of wrapper code to interact with them, since WinFile would need to supply ISecurityInformation. I haven't used these but if I'm reading it right, the caller is expected to supply a callback for OpenElevatedEditor which could be used if the calling process doesn't have access (so the DLL doesn't directly provide a helper process for this task.) These "new" APIs appear to support 2000 and up, so keeping code for the older APIs is really for NT 4 and below (which already have an inbox winfile.)

Given that, do you think this is something we should consider integrating with?

schinagl commented 2 years ago

My motivation was to short term get rid of a button which can't be used anymore. Older versions: You anyway have to use your branch, because it has WINVER == 0x500. This branch will anyhow only work with W7++ due to WINVER == 0x600. So .... lets at least remove the button.

I personally do not change permissions that much, and if I do, I always do this via 'Alt-Enter' aka properties, and then follow the standard way. Since there is a simple other way to change permissions, I don't see a need in implementing a workaround with ISecurityInformation

schinagl commented 2 years ago

Only uncommented the IDM_PERMISSIONS, so that one easily can enable it again, if one day there is functionality available again

malxau-msft commented 2 years ago

Like you, I don't use this enough or have enough motivation to tackle this any time soon. But extending our previous conversations, I think it's possible to build an acledit.dll which exposes a File Manager extension interface, that is built on aclui.dll (ie., just a translation layer.) That acledit becomes a drop-in that would light up this capability. It's a little moot unless/until somebody builds one, but it's interesting to note that it should work.