Which special variables are available when writing a shell command for a context menu
Problem
When extending the Windows' shell context menu (e.g. for adding an 'Open command here' prompt on directories), a 'command' key needs to be created in the registry. The value of this 'command' key apparently can be any valid command line. I want to know which 'special variables' are available for use inside this command line. For example, I use following command for opening a cmd window from within a directory's context menu (*): I cannot find any reference to what actually means or what the full list of such variables is. (*) Following registry keys are created for this:
Error Output
cmd.exe /e:on /f:on /s /k pushd "%V"
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: Which special variables are available when writing a shell command for a context menu
A comment by Chris Guzak on the Extending Shortcut Menus MSDN article lists the various "command line variables" that are available: %* – Replace with all parameters. %~ – Replace with all parameters starting with and following the second parameter. %0 or %1 – The first file parameter. For example "C:\Users\Eric\Desktop\New Text Document.txt". Generally this should be in quotes and the applications command line parsing should accept quotes to disambiguate files with spaces in the name and diffe…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix