Bug 460754 - Windows Shell extension for KDiff3not working after installing kdiff3-1.9.6-windows-64-cl.exe
Summary: Windows Shell extension for KDiff3not working after installing kdiff3-1.9.6-w...
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: context-menu (show other bugs)
Version: 1.9.6
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-20 10:59 UTC by Philip Beck
Modified: 2023-03-27 15:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 10.0.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Beck 2022-10-20 10:59:22 UTC
SUMMARY
***
I could not use the KDiff3 shell extension to compare two folders after installing kdiff3-1.9.6-windows-64-cl.exe on windows 10
In Windows File Explorer I selected two folders to compare,  right clicked on one of the selected and selected the Shell extension KDiff3 -> Compare.  An error box was displayed with the message :

---------------------------
Diff-Ext For KDiff3
---------------------------
Could not start KDiff3. Please rerun KDiff3 installation.
Command: C:\Program Files\KDiff3\kdiff3.exe
CommandLine: "C:\Program Files\KDiff3\kdiff3.exe" "{selected folder A}" "{selected folder B}"
---------------------------
OK   
---------------------------



 
***


STEPS TO REPRODUCE
1. Install kdiff3-1.9.6-windows-64-cl.exe on Windows 10 

I previously had an old version of KDiff3 installed, which I uninstalled before installing version kdiff3-1.9.6-windows-64-cl.exe. 
So there may have been old registry entries still present.
The old version installed it to                         : C:\Program Files\KDiff3\Kdiff3.exe
kdiff3-1.9.6-windows-64-cl.exe installed it to : C:\Program Files\KDiff3\bin\Kdiff3.exe

2. In Windows File Explorer select two folders to compare
3. In Windows File Explorer right click on one of the selected folders and select the Shell extension KDiff3 -> Compare.

OBSERVED RESULT
An error box was displayed showing:

---------------------------
Diff-Ext For KDiff3
---------------------------
Could not start KDiff3. Please rerun KDiff3 installation.
Command: C:\Program Files\KDiff3\kdiff3.exe
CommandLine: "C:\Program Files\KDiff3\kdiff3.exe" "{selected folder A}" "{selected folder B}"
---------------------------
OK   
---------------------------

EXPECTED RESULT
Kdiff3 should load and run, comparing the two selected folders.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
The solution for me was to manually add the string "bin\" in the following registry keys.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\KDiff3\diff-ext]
"InstallDir"="C:\\Program Files\\bin\\KDiff3"
"diffcommand"="C:\\Program Files\\KDiff3\\bin\\kdiff3.exe"
Comment 1 michael 2022-10-21 18:39:14 UTC
Thanks for the report It Looking at source for the install it appears to be setting the correct path. I wonder if something was left over from a previous install.
Comment 2 bfield 2022-11-04 15:41:57 UTC
I can confirm this behaviour.
Previous installed version was 0.9.98 on Windows 10. 
After installing KDiff3 version 1.9.6 the KDiff3 shell extension didn't work any more. The registry keys still contained the old path without "\\bin".
Comment 3 michael 2022-11-10 17:49:06 UTC
Thanak. When updating a reboot is needed to fully unload to old shell extension. This shows up on upgrade from 0.9.98 because the registry settings have moved from the original location. Once 1.8.x or 1.9.x is installed there should be no issue as the context menu extension rarely needs any changes. The installer should be removing those old entries as they are not longer read. I'll looking into that aspect as well as possibly a restart warning since this can catch people off guard.
Comment 4 michael 2023-03-27 15:05:07 UTC
Git commit 69348c91cad922ee0357a38780f4684923b55933 by Michael Reeves.
Committed on 27/03/2023 at 15:02.
Pushed by mreeves into branch 'master'.

[kdiff3] Improve cleanup add reboot warning
Related: bug 459139
FIXED-IN:10.0.1

M  +14   -1    extragear/kdiff3/kdiff3.py

https://invent.kde.org/packaging/craft-blueprints-kde/commit/69348c91cad922ee0357a38780f4684923b55933