0
So I'm trying to make a right click context menu option that will copy the path of a file in Windows 7. This is my registry stuff:
[HKEY_CLASSES_ROOT\*\shell\Copy path]
[HKEY_CLASSES_ROOT\*\shell\Copy path\command]
@="C:\Windows\System32\Tweaks\ContextCopy.exe path %1"
The option correctly shows up in the context menu. ContextCopy.exe takes a the file's absolute path as a string and internally copies it to the clipboard depending on what the first argument is. It works fine as I've tested it from the command prompt with an actual filename for the last argument. But whenever I do it from the context menu, I get an error pop up that says "This file does not have a program associated with it for performing this action." And the title of this pop up is the path of the file that I right clicked and opened the menu on. The path is also not copied to the clipboard.
I think %1 should give the file's absolute path as a string, right?
1Thanks for closing the loop on your question. To make the answer clearer for others with a similar problem, can you add the actual resulting commands? – fixer1234 – 2016-05-31T17:12:48.037
Yep just added them – Brandon Johnson – 2016-06-02T22:14:23.057
In the site's Q&A format, questions are limited to just the question and the solutions go in the answers. I went ahead and moved it for you. If you accept your answer or one of the others, it will indicate that the problem has been solved. To do that, click on the checkmark next to the answer you consider the solution. – fixer1234 – 2016-06-03T03:16:43.457