Search notes:

Adding an item to the Windows desktop right click menu

Add the command to the default value of the HKCR\Directory\Background\shell\YourItemName\shell\command registry key.
reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\Foo Bar Baz\command" /t REG_SZ /ve /d "cmd.exe /k echo FooBarBaz"

See also

registry

Index