必须在 avi 文件的上下文菜单中添加“在 %my program% 中打开”选项,而不更改默认程序。
根据各种手册添加了密钥:
[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"=""
然而,这一切并没有产生预期的效果。可能是什么问题呢?
试试这个: