需要在不更改默认程序的情况下将“在 %我的程序% 中打开”选项添加到 avi 文件的上下文菜单中。
根据各种手册添加了键:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi\shell\my_application]
@="my app title"
"Icon"="C:\\Users\\shtuller\\AppData\\Roaming\\my_app\\icon_64.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.avi\shell\my_application\command]
@="\"C:\\User\\\\shtuller\\AppData\\Roaming\\my_app\\open.bat\" \"%1\""
和
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\my_application]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\my_application\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\my_application\shell\Open]
"FriendlyAppName"="my app title"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\my_application\shell\Open\command]
@="\"C:\\Users\\shtuller\\AppData\\Roaming\\my_app\\open.bat\" \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\my_application\SupportedTypes]
".avi"=""
然而,这一切都没有取得预期的效果。问题出在哪里呢?
答案1
尝试一下这个:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\Shell\my_application]
@="my app title"
"Icon"="C:\\Users\\shtuller\\AppData\\Roaming\\my_app\\icon_64.ico"
[HKEY_CLASSES_ROOT\SystemFileAssociations\.avi\Shell\my_application\command]
@="\"C:\\Users\\shtuller\\AppData\\Roaming\\my_app\\open.bat\" \"%1\""