Skip to content
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

Can't remove from Explorer Context Menu #498

Closed
runxel opened this issue Apr 5, 2021 · 6 comments
Closed

Can't remove from Explorer Context Menu #498

runxel opened this issue Apr 5, 2021 · 6 comments

Comments

@runxel
Copy link

runxel commented Apr 5, 2021

#487 was just the question with the "answer" being 'run in it admin mode to disable it'.
This, however, does not work.
Even if I run dnGrep as admin, I can't deselect the checkboxes in the options. They are still greyed out.

@doug24
Copy link
Contributor

doug24 commented Apr 5, 2021

I just tried it on two different machines, and is working on both of them. dnGrep v2.9.326 on Windows 10. One is my own laptop, and the other is a work computer administered by an IT organization.

If they are disabled, then it appears that trying to open the Registry Keys is throwing an UnauthorizedAccessException, or an the check if the current user is in the Administrators role failed.

What version of dnGrep are you running?
Is it installed using the MSI installer downloaded from github, or by another source like Choocolately or WinGet?
What operating system are you running?

@runxel
Copy link
Author

runxel commented Apr 6, 2021

I have installed dnGrep (also v2.9.326) via chocolatey on a PC running Windows 10 (20H2).

@JVimes
Copy link
Contributor

JVimes commented Apr 11, 2021

If the cause eludes us and you're comfortable editing the Windows registry, deleting the following registry keys should remove the menu items from the machine in question. If you haven't done this before, backup the registry or create a restore point first just to be safe.

HKEY_CLASSES_ROOT\*\shell\dnGREP
HKEY_CLASSES_ROOT\Directory\Background\shell\dnGREP

The checkbox removed them for me. I wonder if the issue is something to do with the machine in question. Maybe something to do with permissions or antivirus? Hard to guess what it might be.

@doug24
Copy link
Contributor

doug24 commented Apr 11, 2021

There are two more registry keys:
HKEY_CLASSES_ROOT\Drive\Background\shell\dnGREP
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\dnGREP

@doug24
Copy link
Contributor

doug24 commented Apr 11, 2021

I suspect the permission problem is with how the code was testing if the app is started as administrator - the code was using a text string "Administrator" which may be locale dependent. I have a pull request in now that changes that to an enumeration value for administrator. Hope that will work.

The Windows Explorer context menu entries are also added by the dnGrep installer. To skip that installation you must do the "Custom" install and disable that installer option. I've updated the installer text in the new pull request. Based on my testing, disabling the install option doesn't remove the context menu entries, just doesn't add them if they do not exist.

@doug24
Copy link
Contributor

doug24 commented Jun 27, 2021

My latest attempt to fix this is in Release 2.9.345

@doug24 doug24 closed this as completed Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants