Wednesday, June 22, 2011

Context Menu for WinMerge appliction in x64

WinMerge application has the same source for x86 and x64 machines.
The application works fine when packaged in MSI for x86, but the same application will not work on x64 as the context menu option will not be visible. To get the context menu option, follow these steps:
1) Install the source on 64 bit machine and from INSTALLDIR, copy the ShellExtensionx64.dll file.
2) Register this Dll file and keep its registry information in a reg file.
3) The 32 bit version of this ShellExtension is ShellExtensionU.dll, hence make the component of this .dll conditionalized to be installed only on 32 bit machines. For this you can write the Condition as: (VersionNT32)
4) Create a 64 bit component and import ShellExtensionx64.dll and its registry in it. The condition to make this component install only in 64 bit machines is: (VersionNT64)
5) Also keep in mind to launch the application before taking a second snapshot of the application. This will include some HKCU registry keys which go in HKCU\Software\Thingamahoochie\WinMerge
This is important as a registry is created in this hive, ContextMenuEnabled=1, which enables the context menu in the application.

No comments: