Description
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
(This will apply only for 64-bit; as I understand it, there's no 32-bit Windows 11 planned)
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
(This will be Windows 11, but I don't have a test instance to validate what cmd.exe /c ver says)
- What options did you set as part of the installation? Or did you choose the
defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
(Applies to ext\shellhere and ext\guihere)
- Any other interesting things about your environment that might be related
to the issue you're seeing?
n/a
Details
The upcoming Windows 11 release changes how context menus are registered. While the regkey-based system currently in use will continue to function, such commands will be demoted behind a "Show more options" menu. To be clear, shell integration won't be broken on Win11, but it will be less convenient.
The new model uses what's called an IExplorerCommand
and requires an "app identity" to attribute the integration. Identity is established for so-called "unpackaged" Win32 (like Git for Windows) using a concept called Sparse Manifests.
I believe the work required will be:
- Create a Sparse Manifest
- Looks like this may require some visual assets, which would need to be chosen and rendered
- There also appears to be an additional signing step (this blog post, see Signing a Sparse package)
- Detect Windows 11 in the installer
if (windows.version == 11 && ext\shellhere == true) { register using IExplorerCommand }
- Same as ☝️ but for
ext\guihere
- Think through the upgrade story -- if someone has GfW installed on a Win10 box and then upgrades to Win11, the context menu items won't be registered. Ideally the next time they update GfW, the right thing happens and they get the new context menu items.
The Windows team shared sample code. Their PM also offered to help out, should someone in the community wish to pick this work up and run into any trouble. microsoft/vscode#127365 includes a screenshot demonstrating where IExplorerCommand
s appear.