I wanted to disable an item in Windows context menus so I found the key relating to it. Deleting this key may solve my problem but is there any other way than deleting it would do the work? Perhaps adding a "--" string before its 'default' value?
-
1. Change key access right or 2. make registry key backup, then delete it.Daemon-5– Daemon-52021-11-24 07:12:11 +00:00Commented Nov 24, 2021 at 7:12
-
ok how can I change access right? and Have you heard anything about add a "--" like prefix to the default string value to nullify a registry key?Milad– Milad2021-11-24 10:30:39 +00:00Commented Nov 24, 2021 at 10:30
-
You can just change the value and watch for result. Are there any reason you are afraid of?Daemon-5– Daemon-52021-11-24 13:37:11 +00:00Commented Nov 24, 2021 at 13:37
-
@Daemon-5 Actually I do because I'm a beginner. I was afraid to do something irreversible and I am not very comfortable in Importing/Exporting registry keys.Milad– Milad2021-11-25 04:57:18 +00:00Commented Nov 25, 2021 at 4:57
-
Anyway if you're gonna work with registry you have to learn how to make registry backupDaemon-5– Daemon-52021-11-26 03:24:42 +00:00Commented Nov 26, 2021 at 3:24
2 Answers
Without knowing the type of verb we are talking about it is hard to give an exact answer.
If it is a static verb (...\xyz\shell\open) then inside the "open" key create one or more of the following empty string values: Extended, LegacyDisable or ProgrammaticAccessOnly.
If this verb has DropTarget and/or DelegateExcute you might have to rename those.
If it is a dynamic verb (...\xyz\shellex\open) you need to change the guid (subkey or value) to make it invalid. Prepend any character before {.
You can also prevent Explorer from reading the key by changing the ACL. Right-click the verb key and select "Permissions" and in the standard security dialog go into advanced mode and deny yourself or your group the query and enumerate access rights.
1 Comment
This is an insane, absolutely twilight zone situation that this plain, direct, simple question with so many coders on the internet cannot get a simple answer. To disable a line of code you prepend with something. Usually this ";". But Microsoft says to "DELETE" a key entry you prepend with "-". And every single time this question is repeated by some bot or bot-head the answer turns into HOW TO DISABLE REGEDIT, or EDITING. My mind is blown for stupid. We're talking about a key entry, not values - if you disable the key you disable the function and all sub-entries. So this will be the first last latest or soon to be Alien-vaporized answer: (THREE POSSIBILITIES)
Back up the key entry and delete the original.
Prepend the key entry with a -
SET A DIFFERENT PREPEND - like DISABLED= so all of them will be searchable
I'm gonna do #3.
ALSO: MARK the location as a favorite as another breadcrumb.