win7系统中,用注册表的方式添加几个右键菜单

1.文件夹里面 空白处》右键菜单》生成文件清单
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\生成文件清单]
[HKEY_CLASSES_ROOT\Directory\Background\shell\生成文件清单\command]
@="C:\\Windows\\System32\\cmd.exe /c tree /f > 文件清单filelist.txt "

2.选中文件夹后》右键菜单》生成文件清单
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\生成文件清单]
[HKEY_CLASSES_ROOT\Folder\shell\生成文件清单\command]
@="C:\\Windows\\System32\\cmd.exe /c tree \"%1\" /f > \"%1\\文件清单filelist.txt\" "

3.选中文件夹后》右键菜单》在此目录打开cmd
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\在此目录打开cmd]
[HKEY_CLASSES_ROOT\Folder\shell\在此目录打开cmd\command]
@="C:\\Windows\\System32\\cmd.exe /k cd %l"

4. 文件夹里面 空白处》右键菜单》在此目录打开cmd
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\在此目录打开cmd]
[HKEY_CLASSES_ROOT\Directory\Background\shell\在此目录打开cmd\command] 
@="C:\\Windows\\System32\\cmd.exe /k"

--以下使用了自己开发的java程序,不具备通用性,只有技术参考性---------------------------------
执行命令行调用java程序:选中文件夹后》右键菜单》照片整理
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\照片整理]
[HKEY_CLASSES_ROOT\Folder\shell\照片整理\command]
@="C:\\Windows\\System32\\cmd.exe /k java -classpath \"F:/imgAutoTool/imggrouptool.jar;F:/imgAutoTool/lib/chineseutils-0.1.jar;F:/imgAutoTool/lib/commons-beanutils-1.7.0.jar;F:/imgAutoTool/lib/commons-codec-1.9.jar;F:/imgAutoTool/lib/commons-collections-3.2.1.jar;F:/imgAutoTool/lib/commons-io-2.4.jar;F:/imgAutoTool/lib/commons-lang3-3.3.2.jar;F:/imgAutoTool/lib/metadata-extractor-2.8.1.jar;F:/imgAutoTool/lib/slf4j-api-1.7.5.jar;F:/imgAutoTool/lib/xmpcore-5.1.2.jar;\" test.ImgAutoGroup \"%l\" \"86400000\" \"jpg,mov,nef,cr2,mp4,orf\""

猜你喜欢

转载自blog.csdn.net/ccxw1983/article/details/85846394