Skip to content
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

doesnt work with windows 11 22624 #394

Open
ecimen81 opened this issue May 12, 2023 · 7 comments
Open

doesnt work with windows 11 22624 #394

ecimen81 opened this issue May 12, 2023 · 7 comments

Comments

@ecimen81
Copy link

Hello

sharpshell doesnt work with windows 11 anymore? any update for windows 11 soon?

@Countryen
Copy link
Collaborator

Countryen commented May 13, 2023

Hey @ecimen81 what's not working for you? I was helping another person recently and on my system it is working. I've only tested a SharpContextMenu though.

Edition	Windows 11 Pro
Version	22H2
Installed	‎08.‎01.‎2023
OS Build	22621.1702
Performance Windows Feature Experience Pack 1000.22641.1000.0

Can you please give more infomation, what is not working (maybe a specific feature you need?)

@ecimen81
Copy link
Author

ecimen81 commented May 13, 2023

Hey @ecimen81 what's not working for you? I was helping another person recently and on my system it is working. I've only tested a SharpContextMenu though.

Edition	Windows 11 Pro
Version	22H2
Installed	‎08.‎01.‎2023
OS Build	22621.1702
Performance Windows Feature Experience Pack 1000.22641.1000.0

Can you please give more infomation, what is not working (maybe a specific feature you need?)

i am talking about CountLinesExtension sample.. i just use CountLinesExtension.dll from sample folder without touching anything and running below cmd commands with admin privilege..

C:\tmp\New folder>ServerRegistrationManager.exe install CountLinesExtension.dll -codebase

========================================
SharpShell - Server Registration Manager
CountLinesExtension.dll installed and registered.
Microsoft .NET Framework Assembly Registration Utility version 4.8.9032.0
for Microsoft .NET Framework version 4.8.9032.0
Copyright (C) Microsoft Corporation. All rights reserved.

Types registered successfully

but doesnt show up on explorer contextmenu.

@Countryen
Copy link
Collaborator

Countryen commented May 13, 2023

There are multiple known issues / traps that can lead to that and I can try to help you with most of them. Do you know much about this topic (windows registry, context menu handlers, COM-Server, etc?) already?

Please see also for details:

SharpShell also lists Windows 11 as fully supported:
https://github.com/dwmkerr/sharpshell#compatibility


I can test it with the sample project, too (I did not use the sample project in my tests), maybe something is wrong with the sample. Could you please give me the exact information what you downloaded (URL) / extracted or used (also for the SRM?)) so I can replicate as easy as possible?

Did you download this https://github.com/dwmkerr/sharpshell/tree/main/SharpShell/Samples/ContextMenu/CountLinesExtension and build it yourself or where is the DLL and the ServerRegistrationManager.exe from?


Some questions:

  • Did you look in the "advanced context menu" or in the "new windows 11 context menu"? The SharpContextMenu cannot be added to the new windows 11 menu (only the advanced (aka. old) menu), yet.
  • Did you / could you please look in the registry, if the necessary entries are created? Sometimes other extensions or "entries" can make problems, too.
    • You should find something when you just search the full registry for "CountLinesExtension".
    • Since you use -codebase, you could also try to search for the path the DLL is installed (C:\tmp\New folder\CountLinesExtension.dll" I guess).
    • If nothing comes up, then there is a bigger problem.
    • If there are entries maybe we can find errors in them.

There are also debugging options you could look into.

@ecimen81
Copy link
Author

ecimen81 commented May 13, 2023

There are multiple known issues / traps that can lead to that and I can try to help you with most of them. Do you know much about this topic (windows registry, context menu handlers, COM-Server, etc?) already?

Please see also for details:

SharpShell also lists Windows 11 as fully supported: https://github.com/dwmkerr/sharpshell#compatibility

I can test it with the sample project, too (I did not use the sample project in my tests), maybe something is wrong with the sample. Could you please give me the exact information what you downloaded (URL) / extracted or used (also for the SRM?)) so I can replicate as easy as possible?

Did you download this https://github.com/dwmkerr/sharpshell/tree/main/SharpShell/Samples/ContextMenu/CountLinesExtension and build it yourself or where is the DLL and the ServerRegistrationManager.exe from?

Some questions:

  • Did you look in the "advanced context menu" or in the "new windows 11 context menu"? The SharpContextMenu cannot be added to the new windows 11 menu (only the advanced (aka. old) menu), yet.

  • Did you / could you please look in the registry, if the necessary entries are created? Sometimes other extensions or "entries" can make problems, too.

    • You should find something when you just search the full registry for "CountLinesExtension".
    • Since you use -codebase, you could also try to search for the path the DLL is installed (C:\tmp\New folder\CountLinesExtension.dll" I guess).
    • If nothing comes up, then there is a bigger problem.
    • If there are entries maybe we can find errors in them.

There are also debugging options you could look into.

Yes exactly i downloaded from this https://github.com/dwmkerr/sharpshell/tree/main/SharpShell/Samples/ContextMenu/CountLinesExtension

i used the ServerRegistrationManager.exe compiled by me from extracted sharpshell-main.rar file which i downloaded from the link https://github.com/dwmkerr/sharpshell/archive/refs/heads/main.zip

sharpshell version 2.7.2.0

and also i uploaded dlls now you can also check if its working or not?

here the dlls which i am trying to register.

https://mega.nz/file/lGIFBRiT#dcP44M3uE1rvTLRazqOoIKH19W7vuc3kK_oEvb2Rfa4

by the way i tried with windows 10 vmware and i used the same command line with same dlls and its working..****

image

@Countryen
Copy link
Collaborator

Countryen commented May 13, 2023

Okay thank you for the additional information.

Yes, I also have problems with the sample project. Unfortunately to say, I remember that it was difficult/impossible to get it working on Windows 11 with a specific file extension (which is used in the sample project).

It should work, when you not target ".txt" directly but either a custom extension or with any extension (*). When you register it for any extension it will be loaded for every file but you can only show it for wanted extensions by overriding the "ShowMenu" method.

I have not found another way to get it working, yet. It seems like in win11 the explorer has new places it looks for or overrides with the entries SharpShell makes, since the "*" and also custom extensions, seem to work. So I would not count that as "fully supported" but maybe that is only true for the SharpContextMenu - or, could also be, that it only works for some as the windows shell is very complex.

If that is a solution for you, you should try it. All you need to do is change

[ComVisible(true)]
[COMServerAssociation(AssociationType.ClassOfExtension, new string[] { ".txt" })]
public class CountLinesExtension : SharpContextMenu

to

[ComVisible(true)]
[COMServerAssociation(AssociationType.AssociationType.AllFiles)]
public class CountLinesExtension : SharpContextMenu

I will try something soon myself as I need it myself and will let you know in here when I find something out.

@ecimen81
Copy link
Author

Thanks alot for helping .Yes you are right !! your solution is working. i am looking forward to hearing from you that you find a better solution for this problem.. Thanks again.

@Raxizh
Copy link

Raxizh commented Nov 6, 2023

Okay thank you for the additional information.

Yes, I also have problems with the sample project. Unfortunately to say, I remember that it was difficult/impossible to get it working on Windows 11 with a specific file extension (which is used in the sample project).

It should work, when you not target ".txt" directly but either a custom extension or with any extension (*). When you register it for any extension it will be loaded for every file but you can only show it for wanted extensions by overriding the "ShowMenu" method.

I have not found another way to get it working, yet. It seems like in win11 the explorer has new places it looks for or overrides with the entries SharpShell makes, since the "*" and also custom extensions, seem to work. So I would not count that as "fully supported" but maybe that is only true for the SharpContextMenu - or, could also be, that it only works for some as the windows shell is very complex.

If that is a solution for you, you should try it. All you need to do is change

[ComVisible(true)]
[COMServerAssociation(AssociationType.ClassOfExtension, new string[] { ".txt" })]
public class CountLinesExtension : SharpContextMenu

to

[ComVisible(true)]
[COMServerAssociation(AssociationType.AssociationType.AllFiles)]
public class CountLinesExtension : SharpContextMenu

I will try something soon myself as I need it myself and will let you know in here when I find something out.

I find myself with much of the same issue. It seems to be impossible to get anything (aside from thumbnail and tooltip) to work with certain file extensions in Windows 11 (.scp for me). Have you found a solution yet for this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants