[Solved] How to add content to windows right click menu? lazarus / 34-Windows ---------------------------------------------------------------------- loaded · 2022-07-19 07:59 Hi All, I want to add content to right click menu in windows according to file extension. If anyone has worked on the subject before, I would appreciate it if they could share their experiences. Respects. ---------------------------------------------------------------------- Thaddy · 2022-07-19 08:53 https://docs.microsoft.com/en-us/previous- versions//bb776881(v=vs.85)?redirectedfrom=MSDN I can help you if you can not Pascalify it yourself. ( There are for sure examples out there, btw) Note this involves a shellextension and so on Windows 64 you need to write the extension in 64 bit too. ---------------------------------------------------------------------- loaded · 2022-07-19 10:50 Thank you very much for the reply, Master Thaddy. Quote from: Thaddy on July 19, 2022, 10:53:58 amI can help you if you can not Pascalify it yourself. Thank you very much for your offer. I don't want to take up your precious time for this. The way you showed is good enough for me, I hope I can handle the rest. Respects. ---------------------------------------------------------------------- Remy Lebeau · 2022-07-19 18:10 You don't actually need to write a Shell Extension to accomplish this, unless you need to do some really advanced stuff (dynamic menus, owner-drawn menus, etc).  Otherwise, a few Registry keys is all you really need: https://docs.microsoft.com/en-us/windows/win32/shell/context-menu ---------------------------------------------------------------------- Thaddy · 2022-07-19 19:04 Quote from: Remy Lebeau on July 19, 2022, 08:10:00 pmYou don't actually need to write a Shell Extension to accomplish this, unless you need to do some really advanced stuff (dynamic menus, owner-drawn menus, etc).  Otherwise, a few Registry keys is all you really need: https://docs.microsoft.com/en-us/windows/win32/shell/context-menu But that will give you an appearance and a no show. ---------------------------------------------------------------------- lainz · 2022-07-19 21:07 Remember that from Windows 11 these menu are by default hidden. You need to do other way for Windows 11. ---------------------------------------------------------------------- Thaddy · 2022-07-20 00:43 Correct. You need more than a few registry keys. ---------------------------------------------------------------------- loaded · 2022-07-20 05:02 Thank you very much Remy Lebeau and lainz for your answer suggestions. Quote from: Remy Lebeau on July 19, 2022, 08:10:00 pmYou don't actually need to write a Shell Extension to accomplish this, unless you need to do some really advanced stuff (dynamic menus, owner-drawn menus, etc).   Yes, that's right, I just wanted to process a simple file extension. Quote from: lainz on July 19, 2022, 11:07:04 pmRemember that from Windows 11 these menu are by default hidden. You need to do other way for Windows 11. Yes, the classic behavior of windows ---------------------------------------------------------------------- Remy Lebeau · 2022-07-20 18:07 Quote from: Thaddy on July 19, 2022, 09:04:18 pmQuote from: Remy Lebeau on July 19, 2022, 08:10:00 pmhttps://docs.microsoft.com/en- us/windows/win32/shell/context-menu But that will give you an appearance and a no show. I don't understand what you are saying.  But in any case, using just Shell registry keys, you can still make items for the right-click context menu. The items just may take more steps to reach in the menu (ie, using the "Show more options" item, or Shift-F10, etc), but the registry items are still accessible. Quote from: lainz on July 19, 2022, 11:07:04 pmRemember that from Windows 11 these menu are by default hidden. You need to do other way for Windows 11. According to references I saw, Windows 11 wants us to customize the context menu by implementing IExplorerCommand w/ an app identity (implementing IContextMenu as @Thaddy suggested is just as old as using Registry keys), or by using a Sparse manifest.  That is quite a bit more work just for simple menu items. ---------------------------------------------------------------------- loaded · 2022-08-19 11:31 This is how I solved my problem indirectly though not directly. https://wiki.freepascal.org/FileAssociation/fr