'Adding a command to the right click menu in Windows using Python

My question is, how to add a command to the right click menu using Python. Note that this application is for Windows.

I need to add the command here -

Image link



Solution 1:[1]

Your screenshot is from Windows 11 and Microsoft has decided to make it difficult to add items on this system. You cannot do it with Python, you need to write a shell extension in native code.

To add something in Windows 10 and older, add your command line to the default value in HKEY_CURRENT_USER\Software\Classes\DesktopBackground\shell\my_thing\command.

See MSDN for more information about registering verbs.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Anders