WinDepends
WinDepends copied to clipboard
Shell integration
RemoveAssoc is never called - easy fix.
SetAssoc, use a quoted path, for when people have spaces in their file path:
try
{
using (var regKey = Registry.ClassesRoot.CreateSubKey(extKeyName, true))
{
if (regKey != null)
{
// Set command value.
using (var subKey = regKey.CreateSubKey("command"))
{
subKey?.SetValue("", $"\"{Application.ExecutablePath}\" \"%1\"", RegistryValueKind.String);
}
// Set icon value.
regKey.SetValue("Icon", $"{Application.ExecutablePath}, 0", RegistryValueKind.String);
}
}
}
@hfiref0x
It seems like you forgot to include quotes around the %1 placeholder. The latest snapshot build is still creating "C:\WinDepends\bin\WinDepends.exe" %1 for the context menu, which doesn't work for files with spaces in their paths.
BTW: Working great on Windows 7. Thanks for this amazing tool.
@i486 You are right, thanks. This should be fixed now in the above mentioned commit.