How do I add Cygwin to the File Explorer's context menu in Windows?

Step 1

Install chere.

Step 2

Execute in Cygwin:

chere -i -t mintty -s bash -f

It adds an item to the File Explorer's context menu:
2023-05-06--09-12-37

Step 3

I delete the HKEY_CLASSES_ROOT\Directory\shell\cygwin64_bash branch from Windows Registry because I never open a console by right-clicking on a folder icon: I always click on a folder window's background instead.

Step 4

Open the HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash branch of Windows Registry.
Replace «&Bash Prompt Here» with «cygwin»:
2023-06-09--19-13-20
Now the Cygwin's menu item looks like this:
2023-06-09--19-14-18

Step 5

Set HKEY_CLASSES_ROOT\Directory\Background\shell\cygwin64_bash\command to:

C:\tools\cygwin\bin\mintty.exe -t cygwin -e /bin/xhere /bin/bash.exe "%V"

2023-06-09--19-33-01

Step 6

Now I will add an icon to the menu item (similar to cmd and PowerShell 7).
Add the «Icon» key with the «C:\tools\cygwin\bin\mintty.exe» value (actually, I do not use Mintty, i just use its icon):
2023-05-06--09-35-16

Step 7

2023-06-09--19-14-18

Step 8

Set up the appearance.