Thursday, 15 May 2014

contextmenu - in windows, how to associate a context menu to a FILE NAME (not by extension) ? -



contextmenu - in windows, how to associate a context menu to a FILE NAME (not by extension) ? -

i want able right-click file (e.g. "setup.py"), , run actions on it, arguments.

(in case: execute command "python setup.py install" on it, @ location.)

i not want associate *.py files, clutters context menu.

is possible?

ok , got working.

(official docs: http://msdn.microsoft.com/en-us/library/windows/desktop/cc144171%28v=vs.85%29.aspx )

the reply add together "appliesto" string key file's type registry entry.

in case, was:

[hkey_classes_root\python.file\shell\setup] "appliesto"="setup.py" [hkey_classes_root\python.file\shell\setup\command] @="d:\\\\utils\\\\set-up-python-and-pause.bat"

and completeness sake (irelevant question) - set-up-python-and-pause.bat:

python setup.py install pause

windows contextmenu

No comments:

Post a Comment