-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest Notepad++ replaces "Pin to Quick access" in the Windows 11 menu #13320
Comments
Please consider rolling back release 8.5 until this is fixed. 😣 Also, people have left comments on the commit and other places as well. Rolling back the release would stop more people from getting messed up installs, and save a lot of headache. |
Doesn't seem necessary to do it the way it's currently implemented. It is toggleable, however. |
It's not true. this entry will be untouched if it has been taken. Stop sharing the following useless link with me - it says it "should do" but not says "how to" If you have the concrete solution, please let me know, or you can do your contribution by opening a PR - it's an open source project, remember? For people who don't want the context menu, just uncheck Context Menu Entry during the installation: |
If you have the concrete solution ("correct" way to install context menu entry manually), please let me know, or you can do your contribution by opening a PR. |
@donho Sounds fair, thanks! |
I think this is what is needed: It explains how to create the needed Sparse Package with an example: https://blogs.windows.com/windowsdeveloper/2019/10/29/identity-registration-and-activation-of-non-packaged-win32-apps From what I can see, registrering it should not require too many changes. |
There's a full example here: https://github.com/microsoft/AppModelSamples/tree/master/Samples/SparsePackages/PhotoStoreContextMenu |
Also, there is a clean C++ example for VS Code here: microsoft/vscode#139640 - the one above requires C# it seems |
The context menu project in the sample I linked is all C++, but yeah that's also another good example. |
@donho Why do you think it is okay to hijack the user’s preferences without notifying, at least? There is no mention of this app replacing some other entry in the context menu. Even if there was, it’s still a poor choice to do it like this when there’s documentation and examples available, you just have to look up. This is downright malware behavior - antivirus vendors better flag this release as such. This is unacceptable, the fact that you dare to ship such a mess brings a lot of question marks above the credibility and trust for this project going forward. There are already plenty comments advising not to push forward with this, yet you did it anyway. I will uninstall this product for the time being, this is unacceptable. |
For everyone whose registry has already been messed with, deleting the |
I have started working on implementing this, though nothing is even close to ready yet (the DLL compiles, but that is all - I haven't had time to finish it yet, and we also need to manifest and package files) |
I really expected better from a project like this, than to hijack system entries in unsupported hacky methods. |
@LtCmdrKeene Well to be fair, Microsoft didn't exactly document this convulted process properly, outside from a few random blog posts and some complex samples. Seems like the author had pure intentions here. Maybe at the MVP Summit or your PGIs you can discuss how terrible this process is. |
@riverar Still, this is not a proper way of going about it. Period. As I said, this is malware behavior. Things indeed may be poorly documented or not documented at all sometimes. Trust me, I know how frustrating it feels. But just because someone does something bad, that doesn’t make it okay to do something else equally bad or even worse. |
@valinet |
Okay, I'm not normally the one doing this, but can we please get back on track with fixing the issue (see my PR above), instead of throwing things at each other and acting like children? |
Inexplicably, you failed to understand what I wrote. For example, being open source doesn't make malware less "malwarey". The behavior in the latest update is by all definitions malware. Also, I was not questioning or "whining" about the lack of such feature - I use Windows 11 and live just fine without said feature. So yeah, please pay more attention and actually read what people write before throwing non-sense around. Since you mention it, free software means anything but non-transparency, disregard of feedback and user preferences and malware-like behavior, which, as I said, is exactly what this here is all about. My 2 cents regarding your remark. |
@GurliGebis |
@donho you're welcome 🙂 |
Via installer, this entry will be checked under Windows 11 - if it exists and, and contain the "Notepad++", then it'll be removed (even it's done by user manually). And the new "Edit with Notepad++" (your implementation) will be installed. |
Unfortunately I am too busy to do so myself, but I imagine a lot of the infra for the previous DLL can be reused |
@sylveon if you can point me at some documentation on it, I might be able to take some time to look at it. (I haven't been able to find any, that's why I'm asking) |
From a quick look, it's pretty much exactly what NppShell does. It's all documented here. A full example would then end up being (replacing placeholders of course)
So my suggestion would be to:
This seems a lot cleaner (no duplication of functionality, can't end up with two "Edit with Notepad++" entries, installer can treat this as a normal update of NppShell, etc.) Also, to avoid needing to restart Explorer after registration, one needs to call |
@GurliGebis |
@donho okay, I'll take a look at it - would it be okay if I migrate it into the new project instead? I also have an idea for changing the Register/Unregister functions to new names, and have them do this:
That way, installation just has to call the register function, and it handles it correctly, depending on which Windows version you are installing on. Would that be okay? |
By that I mean moving the new project into the NppShell folder and renaming stuff |
Yes, sounds good to me.
I would say it deserved to be a independent project in Notepad++ organization. |
@donho it is too deeply integrated for that to make sense. |
@GurliGebis And we can use git submodules to include it here. btw |
It sounds good to me - please mark it as work in progress as you did so it won't trigger the CI's compiling. |
@donho I will do. |
Absolutely no idea. With the permission of Andre Burgaud (the author), I've modified the project slightly for meeting Notepad++'s need. You might find some document in the website or you may write to the author. |
There is documentation from the Windows 7 days mentioning IExplorerCommand for menus: https://learn.microsoft.com/en-us/windows/win32/shell/how-to-create-cascading-menus-with-the-iexplorercommand-interface It says:
So I suspect something somewhere else is broken. There's an old sample also from that era here, if that helps: https://github.com/microsoft/Windows-classic-samples/blob/main/Samples/Win7Samples/winui/shell/appshellintegration/ExplorerCommandVerb/ExplorerCommandVerb.cpp |
I think I have figured it out - I'll take a look at it later. |
My God, this program is a horror. Can't be uninstalled completely, leaves context menu doubled up. Uninstalling for good. |
@mike000000000001 well, that is what we are working on fixing, but sure, you are welcome to uninstall if that is what is right for you. |
@mike000000000001 said:
Don't forget to apply for your refund by filling out the refund FORM on your way out... |
@donho I got it working - it seems like skipping WRL is not an option when the IExplorerCommand should work for both classic and modern context menus. |
@GurliGebis |
@donho Windows Runtime Library - develop ment has shifted to WIL (Windows Interface Library), but both are fine to use. |
@GurliGebis Thank you for the explanation. |
@donho they are pretty small - the size difference on my machine on the x64 DLL is only 5kb larger than the old NppShell dll. I have create a PR now with the changes, if you can take a look at it (and maybe create an installer for me to test with)? 🙂 @sylveon thank you for helping with this one, your notes above helped a lot with finding the right place to look. |
The thread becomes huge so let's talk in #13389 then. |
@donho I agree, can you lock this issue? |
Description of the Issue
The latest version of Notepad++ replaces the "Pin to Quick access" in the Windows 11 right click menu.
This is due to it being added in the wrong way.
Instead of just overwriting something else, it should be added like described here:
#13170 (comment)
The correct way to do it is to use Sparse Manifests: https://blogs.windows.com/blog/2021/07/19/extending-the-context-menu-and-share-dialog-in-windows-11/
Also, please don't close this bug as "expected behavior", since you are not supposed to just overwrite the built-in menu options to add your own.
Steps to Reproduce the Issue
Expected Behavior
It shouldn't overwrite the default Windows behavior, but should instead add it's own menu option to the list.
Actual Behavior
It takes the easy (and wrong) way out, and just replaces the existing menu item, instead of doing it the right way.
The text was updated successfully, but these errors were encountered: