HKEY_CLASSES_ROOT
provides a merged view of HKEY_LOCAL_MACHINE\Software\Classes
and HKEY_CURRENT_USER\Software\Classes
which makes it possible to achieve your goal by editing the latter. For instance, here's a reg-file that would add an entry called 'Hulk Smash' to the right-click context menu of any file:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\*\shell\Hulk Smash\command]
@="\"C:\\Program Files\\Notepad++\\notepad++.exe\" \"%1\""
Simply create a new file, paste the above text into it and save it under whatever name you please. Now, you can't use regedit.exe
to import the file because it requires admin privileges even though not all hives actually need admin permissions to access. To work around that, you can use reg.exe
like this:
reg.exe import <nameofyourfile.ext>
The new entry should appear immediately.
If you want to remove the entry from the context menu again, just use the following file:
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\*\shell\Hulk Smash]
1Notepad++ is generally accepted as software that is okay to be used in a business environment. Ask your IT people if its okay if they install it for you. They likely will, and it beats any workaround. – LPChip – 2017-08-17T18:49:34.260