Shell Integration not appearing if installer is run as SYSTEM.
WinMerge Version: 2.16.50.2 OS Version: W11 24H2
When installing "WinMerge-2.16.50.2-x64-Setup.exe" using command line switches or using the GUI running from a SYSTEM CMD window the Shell Integration does not appear. After some testing I found that using the same SYSTEM CMD window and running the command: "regsvr32 "%ProgramW6432%\WinMerge\ShellExtensionX64.dll" /s" results in the Shell Integration appearing for the logged in user ONLY. and the following command removes it: "regsvr32 /u "%ProgramW6432%\WinMerge\ShellExtensionX64.dll" /s" results in the Shell Integration disappearing for the logged in user ONLY.
This was not the behaviour of the previous version "2.16.46.0" on Windows 10 when when installed using the SYSTEM account had Shell Integration after the installer was finished.
We are deploying to an enterprise environment using SCCM, as such the installer are run under the SYSTEM account.
In Windows 11, the WinMerge installer no longer registers ShellExtensionX64.dll, but instead registers the new Windows 11 shell extension WinMergeContextMenu.dll.
It’s likely that this Windows 11 shell extension cannot be registered for all users, so when installed under the SYSTEM account, it may have been registered for the SYSTEM user only. If TortoiseSVN or TortoiseGit can register their shell extensions successfully under similar conditions, my assumption may be incorrect.
As a temporary workaround, please open Options → Shell Integration, and click Register Shell Extension for Windows 11, or click Unregister Shell Extension for Windows 11 once and then Register Shell Extension for Windows 11 again. This may make the shell extension appear correctly.
I have tried to register "WinMergeContextMenu.dll" both in the SYSTEM and user context. Neither load the Shell Integration. What is the command being used to "Register Shell Extension for Windows 11", maybe I can automate this? Getting the user to do this isn't very user friendly, from an enterprise point of view.
To register the Windows 11 shell extension, run this PowerShell command:
Add-AppxPackage "C:\Program Files\WinMerge\WinMergeContextMenuPackage.msix" -ExternalLocation "C:\Program Files\WinMerge"