Skip to content

Shell integration #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AlexW-13 opened this issue Dec 6, 2024 · 2 comments
Closed

Shell integration #9

AlexW-13 opened this issue Dec 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@AlexW-13
Copy link

AlexW-13 commented Dec 6, 2024

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);
                }
            }
        }


@AlexW-13 AlexW-13 added the bug Something isn't working label Dec 6, 2024
@i486
Copy link

i486 commented Feb 15, 2025

@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.

@hfiref0x hfiref0x reopened this Feb 15, 2025
hfiref0x added a commit that referenced this issue Feb 15, 2025
15 Feb, 2025
Address issue #9
@hfiref0x
Copy link
Owner

@i486
You are right, thanks. This should be fixed now in the above mentioned commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants