0
I'm trying to add an entry to the Windows folder background context menu. The following "command" value works:
"P:\Projects\GuardianBlade\OfStrangerFlames\Development\Project\Bin\MakeManifest.exe"
It successfully executes MakeManifest (a tiny development tool I'm working on for my real programming project).
However, I'd like to do this:
"P:\Projects\GuardianBlade\OfStrangerFlames\Development\Project\Bin\MakeManifest.exe" -root="%1"
But that doesn't work. Neither does this:
"P:\Projects\GuardianBlade\OfStrangerFlames\Development\Project\Bin\MakeManifest.exe" "-root=%1"
What I'm aiming for, is the program MakeManifest.exe to execute, and receive one command-line argument of the format:
-root="the/directory/right-clicked/in/"
I want the quotes around the directory path to be passed into MakeManifest preserved, and I'd like the entire thing (-root="the/directory/right-clicked/in/") to be one argument.
Failing that, I'd settle for -root passed in as one argument, and the/directory/path (without quotes but as one argument) passed in as the second argument. I can't get either to work.
All my attempts result in this error message:
"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel."
...as if it were trying to identify what program to execute the entire command as a filepath.
Again, setting the command without any arguments works fine.
How should I do that ?
This question would be better suited for [so]. – kinokijuf – 2013-06-06T19:55:43.860
I was thinking that myself, but I wasn't sure. It's not directly programming related - it has to do with the format of shell commands on Windows. – Jamin Grey – 2013-06-06T20:15:42.817
I think it's perfectly on-topic for SU, but a possible duplicate of What is the list of special variables available when writing a shell command for a context menu
– Karan – 2013-06-06T22:14:48.693Yea, I found that answer after kinokijuf posted! I don't think the question is a duplicate, rather I think the answer to this question is the other topic. =P I'll add the link into kino's answer. – Jamin Grey – 2013-06-06T22:29:07.773