command line - How do I add a right-click option to search the web using a selected file's name? -


i'm looking add option right-click menu in windows explorer launch chrome , search specific site file's name. little more specific, want able on video file , available subtitles it. i'm aware there number of programs can variation of this, after trying out bunch of them, haven't quite found want. not that, i'd rather use lightweight, native code having install program.

the closest thing guide i've found in post, doesn't quite work. of course, i've tried cleaning needs, still doesn't work, think there's flaw in there. here's have far...

running command prompt administrator, executed these 2 lines add them registry:

reg add "hklm\software\classes\*\shell\subtitle search" /d "subtitle search" reg add "hklm\software\classes\*\shell\subtitle search\command" /d "c:\my projects\my code\subtitlesearch.bat ""%1""" 

the, create batch file (subtitlesearch.bat) following:

set xgooglesearch=%~nx1 cmd /c "c:\program files (x86)\google\chrome\application\chrome.exe" "http://subscene.com/subtitles/title?q=%xgooglesearch%" 

that seems pretty straightforward, doesn't work. instead, windows thinks i'm trying open file , asks me program use. if choose chrome, incidentally, starts playing video in tab.

i'm convinced problem registry code, can't figure out how tell system don't want open file i'm right-clicking on; want use filename. i'm familiar registry, not skilled enough see issue is.

thanks in advance help!

the batch-file path contains spaces, have surround quotes:

reg add "hklm\software\classes\*\shell\subtitle search\command" /d "\"c:\my projects\my code\subtitlesearch.bat\" \"%1\"" 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -