有好看 mpv 关联图标方案吗?

官方的紫色图标看着过于阴沉,也没找到这方面的定制包。谁有好看的图标包吗?

1 个赞

个人感觉 Potplayer 的文件类型图标还不错,您可以试试。您可以下载 PotPlayer 的安装程序,然后用 7-Zip、WinRAR 等工具打开该安装文件,再进入 IconPack 文件夹,提取出 PotIconsNew.dll 即可,所有的文件类型图标均在这个文件中。

PotPlayer 的安装文件可到这里下载:

该安装程序的 IconPack 文件夹中可提取出 OldIconPack.dllPotIconsNew.dll 两套图标,对比如下:

1-fs8

更改文件类型图标可用 FileTypesMan:

2 个赞

谢谢,我之前也是用的PotPlayer图标,但没有找到将它作为mpv关联图标的方法。

现在这么多ai画图,感觉可以尝试找一组基础的图标素材,让ai批量生成一组同种风格的图标图片,在通过gfie64或其他的图标制作软件批量生成图标,最后在做关联

@Echo Off
Title Reg Converter v1.2 & Color 1A
cd %systemroot%\system32
call :IsAdmin

cls
echo 选择图标 1三角 2方框
set /p file=请选择?(1/2):
if "%file%"=="1" goto sanjiao
if "%file%"=="2" goto fangkuang

:sanjiao
set icon_path=%~dp0PotIcons.dll
goto guanlian

:fangkuang
set icon_path=%~dp0PotIconsNew.dll
goto guanlian

:guanlian
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AC3" /v "FriendlyTypeName" /t REG_SZ /d "AC3 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AC3\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,62" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.EAC3" /v "FriendlyTypeName" /t REG_SZ /d "EAC3 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.EAC3\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MLP" /v "FriendlyTypeName" /t REG_SZ /d "MLP - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MLP\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DTS" /v "FriendlyTypeName" /t REG_SZ /d "DTS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DTS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,67" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DTS-HD" /v "FriendlyTypeName" /t REG_SZ /d "DTSHD - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DTS-HD\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.TRUE-HD" /v "FriendlyTypeName" /t REG_SZ /d "TRUE-HD - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.TRUE-HD\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.TTA" /v "FriendlyTypeName" /t REG_SZ /d "TTA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.TTA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.PCM" /v "FriendlyTypeName" /t REG_SZ /d "PCM - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.PCM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WAV" /v "FriendlyTypeName" /t REG_SZ /d "WAV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WAV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,70" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AMR" /v "FriendlyTypeName" /t REG_SZ /d "AMR - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AMR\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,46" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AIFF" /v "FriendlyTypeName" /t REG_SZ /d "AIFF - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AIFF\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AWB" /v "FriendlyTypeName" /t REG_SZ /d "AWB - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AWB\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AU" /v "FriendlyTypeName" /t REG_SZ /d "AU - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AU\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.LPCM" /v "FriendlyTypeName" /t REG_SZ /d "LPCM - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.LPCM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.YUV" /v "FriendlyTypeName" /t REG_SZ /d "YUV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.YUV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.Y4M" /v "FriendlyTypeName" /t REG_SZ /d "Y4M - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.Y4M\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.APE" /v "FriendlyTypeName" /t REG_SZ /d "APE - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.APE\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,64" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WV" /v "FriendlyTypeName" /t REG_SZ /d "WV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SHN" /v "FriendlyTypeName" /t REG_SZ /d "SHN - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SHN\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M2TS" /v "FriendlyTypeName" /t REG_SZ /d "M2TS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M2TS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,77" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.ADTS" /v "FriendlyTypeName" /t REG_SZ /d "ADTS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.ADTS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPA" /v "FriendlyTypeName" /t REG_SZ /d "MPA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,48" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MP3" /v "FriendlyTypeName" /t REG_SZ /d "MP3 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MP3\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,60" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPEG" /v "FriendlyTypeName" /t REG_SZ /d "MPEG - MPEG 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPEG\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,13" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VOB" /v "FriendlyTypeName" /t REG_SZ /d "VOB - DVD 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VOB\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,18" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.EVOB" /v "FriendlyTypeName" /t REG_SZ /d "EVOB - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.EVOB\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPEG4" /v "FriendlyTypeName" /t REG_SZ /d "MP4 - MP4 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MPEG4\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,25" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M4A" /v "FriendlyTypeName" /t REG_SZ /d "M4A - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M4A\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,51" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AAC" /v "FriendlyTypeName" /t REG_SZ /d "AAC - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AAC\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,63" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.H264" /v "FriendlyTypeName" /t REG_SZ /d "H264 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.H264\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HEVC" /v "FriendlyTypeName" /t REG_SZ /d "H265 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HEVC\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLAC" /v "FriendlyTypeName" /t REG_SZ /d "FLAC - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLAC\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,68" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGA" /v "FriendlyTypeName" /t REG_SZ /d "OGG - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,61" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OPUS" /v "FriendlyTypeName" /t REG_SZ /d "OPUS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OPUS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SPX" /v "FriendlyTypeName" /t REG_SZ /d "SPX - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SPX\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGV" /v "FriendlyTypeName" /t REG_SZ /d "OGM - OGM 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,19" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGX" /v "FriendlyTypeName" /t REG_SZ /d "OGV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.OGX\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MKV" /v "FriendlyTypeName" /t REG_SZ /d "MKV - Matroska 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MKV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,20" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MK3D" /v "FriendlyTypeName" /t REG_SZ /d "MK3D - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MK3D\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MKA" /v "FriendlyTypeName" /t REG_SZ /d "MKA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MKA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,69" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WEBM" /v "FriendlyTypeName" /t REG_SZ /d "WEBM - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WEBM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WEBA" /v "FriendlyTypeName" /t REG_SZ /d "WEBA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WEBA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AVI" /v "FriendlyTypeName" /t REG_SZ /d "AVI - Windows 标准视频文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AVI\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,1" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DIVX" /v "FriendlyTypeName" /t REG_SZ /d "DIVX - 视频文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DIVX\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,2" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3IV" /v "FriendlyTypeName" /t REG_SZ /d "3IV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3IV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.XVID" /v "FriendlyTypeName" /t REG_SZ /d "XVID - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.XVID\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NUT" /v "FriendlyTypeName" /t REG_SZ /d "NUT - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NUT\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLIC" /v "FriendlyTypeName" /t REG_SZ /d "FLIC - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLIC\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSV" /v "FriendlyTypeName" /t REG_SZ /d "NSV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GXF" /v "FriendlyTypeName" /t REG_SZ /d "GXF - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GXF\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MXF" /v "FriendlyTypeName" /t REG_SZ /d "MXF - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.MXF\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WMA" /v "FriendlyTypeName" /t REG_SZ /d "WMA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WMA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,47" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WM" /v "FriendlyTypeName" /t REG_SZ /d "WM - Windows 媒体文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,5" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WMV" /v "FriendlyTypeName" /t REG_SZ /d "WMV - Windows 媒体文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WMV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,7" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.ASF" /v "FriendlyTypeName" /t REG_SZ /d "ASF - Windows 媒体文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.ASF\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,3" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DVR-MS" /v "FriendlyTypeName" /t REG_SZ /d "DVR-MS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DVR-MS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WTV" /v "FriendlyTypeName" /t REG_SZ /d "WTV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.WTV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DV" /v "FriendlyTypeName" /t REG_SZ /d "DV - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.DV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLV" /v "FriendlyTypeName" /t REG_SZ /d "FLV - Flash(FLV) 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.FLV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,32" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.F4V" /v "FriendlyTypeName" /t REG_SZ /d "F4V - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.F4V\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.F4A" /v "FriendlyTypeName" /t REG_SZ /d "F4A - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.F4A\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.QT" /v "FriendlyTypeName" /t REG_SZ /d "MOV - Quicktime 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.QT\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,23" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HDMOV" /v "FriendlyTypeName" /t REG_SZ /d "MOV - Quicktime 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HDMOV\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,23" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RM" /v "FriendlyTypeName" /t REG_SZ /d "RM - RealMedia 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,21" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RMVB" /v "FriendlyTypeName" /t REG_SZ /d "RMVB - RealMedia 电影文件" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RMVB\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,22" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RA" /v "FriendlyTypeName" /t REG_SZ /d "RA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.RA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,52" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GA2" /v "FriendlyTypeName" /t REG_SZ /d "3GA2 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GA2\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GA" /v "FriendlyTypeName" /t REG_SZ /d "3GA - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GA\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GP2" /v "FriendlyTypeName" /t REG_SZ /d "3GP2 - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GP2\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,42" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GPP" /v "FriendlyTypeName" /t REG_SZ /d "3GPP - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.3GPP\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,40" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AY" /v "FriendlyTypeName" /t REG_SZ /d "AY - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.AY\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GBS" /v "FriendlyTypeName" /t REG_SZ /d "GBS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GBS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GYM" /v "FriendlyTypeName" /t REG_SZ /d "GYM - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.GYM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HES" /v "FriendlyTypeName" /t REG_SZ /d "HES - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.HES\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.KSS" /v "FriendlyTypeName" /t REG_SZ /d "KSS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.KSS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSF" /v "FriendlyTypeName" /t REG_SZ /d "NSF - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSF\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSFE" /v "FriendlyTypeName" /t REG_SZ /d "NSFE - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.NSFE\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SAP" /v "FriendlyTypeName" /t REG_SZ /d "SAP - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SAP\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SPC" /v "FriendlyTypeName" /t REG_SZ /d "SPC - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.SPC\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VGM" /v "FriendlyTypeName" /t REG_SZ /d "VGM - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VGM\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VGZ" /v "FriendlyTypeName" /t REG_SZ /d "VGZ - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.VGZ\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M3U" /v "FriendlyTypeName" /t REG_SZ /d "M3U - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.M3U\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,53" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.PLS" /v "FriendlyTypeName" /t REG_SZ /d "PLS - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.PLS\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,54" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.CUE" /v "FriendlyTypeName" /t REG_SZ /d "CUE - File" /f
Reg.exe add "HKLM\SOFTWARE\Classes\io.mpv.CUE\DefaultIcon" /ve /t REG_SZ /d "%icon_path%,0" /f

Exit

:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 Cls & Echo You must have administrator rights to continue ... 
 Pause & Exit
)
Cls
goto:eof

这个是我自己提取制作的关联potplayer图标的bat文件
需要自备potplayer的图标PotIcons.dll和PotIconsNew.dll,然后放到bat同目录运行
没有的可以以下连接下载,忘了是那个版本提取的了,反正至少2-3年了

这个只关联图标

需要在mpv官方的mpv-install.bat运行安装完成之后运行

官方的bat各种引用我实在集成不进去,没那个水平

谢谢,我把 bat 转换为了 AutoHotkey:

	dll := "PotIconsNew.dll"
	for t in [["AC3 - File", "AC3", 62], ["EAC3 - File", "EAC3", 0], ["MLP - File", "MLP", 0], ["DTS - File", "DTS", 67], ["DTSHD - File", "DTS-HD", 0], ["TRUE-HD - File", "TRUE-HD", 0], ["TTA - File", "TTA", 0], ["PCM - File", "PCM", 0], ["WAV - File", "WAV", 70], ["AMR - File", "AMR", 46], ["AIFF - File", "AIFF", 0], ["AWB - File", "AWB", 0], ["AU - File", "AU", 0], ["LPCM - File", "LPCM", 0], ["YUV - File", "YUV", 0], ["Y4M - File", "Y4M", 0], ["APE - File", "APE", 64], ["WV - File", "WV", 0], ["SHN - File", "SHN", 0], ["M2TS - File", "M2TS", 77], ["ADTS - File", "ADTS", 0], ["MPA - File", "MPA", 48], ["MP3 - File", "MP3", 60], ["MPEG - MPEG 电影文件", "MPEG", 13], ["VOB - DVD 电影文件", "VOB", 18], ["EVOB - File", "EVOB", 0], ["MP4 - MP4 电影文件", "MPEG4", 25], ["M4A - File", "M4A", 51], ["AAC - File", "AAC", 63], ["H264 - File", "H264", 0], ["H265 - File", "HEVC", 0], ["FLAC - File", "FLAC", 68], ["OGG - File", "OGA", 61], ["OPUS - File", "OPUS", 0], ["SPX - File", "SPX", 0], ["OGM - OGM 电影文件", "OGV", 19], ["OGV - File", "OGX", 0], ["MKV - Matroska 电影文件", "MKV", 20], ["MK3D - File", "MK3D", 0], ["MKA - File", "MKA", 69], ["WEBM - File", "WEBM", 0], ["WEBA - File", "WEBA", 0], ["AVI - Windows 标准视频文件", "AVI", 1], ["DIVX - 视频文件", "DIVX", 2], ["3IV - File", "3IV", 0], ["XVID - File", "XVID", 0], ["NUT - File", "NUT", 0], ["FLIC - File", "FLIC", 0], ["NSV - File", "NSV", 0], ["GXF - File", "GXF", 0], ["MXF - File", "MXF", 0], ["WMA - File", "WMA", 47], ["WM - Windows 媒体文件", "WM", 5], ["WMV - Windows 媒体文件", "WMV", 7], ["ASF - Windows 媒体文件", "ASF", 3], ["DVR-MS - File", "DVR-MS", 0], ["WTV - File", "WTV", 0], ["DV - File", "DV", 0], ["FLV - Flash(FLV) 电影文件", "FLV", 32], ["F4V - File", "F4V", 0], ["F4A - File", "F4A", 0], ["MOV - Quicktime 电影文件", "QT", 23], ["MOV - Quicktime 电影文件", "HDMOV", 23], ["RM - RealMedia 电影文件", "RM", 21], ["RMVB - RealMedia 电影文件", "RMVB", 22], ["RA - File", "RA", 52], ["3GA2 - File", "3GA2", 0], ["3GA - File", "3GA", 0], ["3GP2 - File", "3GP2", 42], ["3GPP - File", "3GPP", 40], ["AY - File", "AY", 0], ["GBS - File", "GBS", 0], ["GYM - File", "GYM", 0], ["HES - File", "HES", 0], ["KSS - File", "KSS", 0], ["NSF - File", "NSF", 0], ["NSFE - File", "NSFE", 0], ["SAP - File", "SAP", 0], ["SPC - File", "SPC", 0], ["VGM - File", "VGM", 0], ["VGZ - File", "VGZ", 0], ["M3U - File", "M3U", 53], ["PLS - File", "PLS", 54], ["CUE - File", "CUE", 0]]
	{
		RegWrite t[1], "REG_SZ", "HKLM\SOFTWARE\Classes\io.mpv." t[2], "FriendlyTypeName"
		RegWrite dll "," t[3], "REG_SZ", "HKLM\SOFTWARE\Classes\io.mpv." t[2] "\DefaultIcon"
	}
1 个赞

结合官方的安装脚本和你的脚本,我重新写了个。

把图标文件重命名为Icon.dll,和这个脚本放到官方的installer文件夹,运行一次就可以了。

@echo off
setlocal enableextensions enabledelayedexpansion
path %SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SystemRoot%\System32\WindowsPowerShell\v1.0\

:: Unattended install flag. When set, the script will not require user input.
set unattended=no
if "%1"=="/u" set unattended=yes

:: Make sure this is Windows Vista or later
call :ensure_vista

:: Make sure the script is running as admin
call :ensure_admin

:: Command line arguments to use when launching mpv from a file association
set mpv_args=

:: Get mpv.exe location
cd /D %~dp0\..
set mpv_path=%cd%\mpv.exe
if not exist "%mpv_path%" call :die "mpv.exe not found"

:: Get mpv-icon.ico location
set icon_path=%~dp0Icons.dll
if not exist "%icon_path%" call :die "mpv-icon.ico not found"

:: Register mpv.exe under the "App Paths" key, so it can be found by
:: ShellExecute, the run command, the start menu, etc.
set app_paths_key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\mpv.exe
call :reg add "%app_paths_key%" /d "%mpv_path%" /f
call :reg add "%app_paths_key%" /v "UseUrl" /t REG_DWORD /d 1 /f

:: Register mpv.exe under the "Applications" key to add some default verbs for
:: when mpv is used from the "Open with" menu
set classes_root_key=HKLM\SOFTWARE\Classes
set app_key=%classes_root_key%\Applications\mpv.exe
call :reg add "%app_key%" /v "FriendlyAppName" /d "mpv" /f
call :add_verbs "%app_key%"

:: Add mpv to the "Open with" list for all video and audio file types
call :reg add "%classes_root_key%\SystemFileAssociations\video\OpenWithList\mpv.exe" /d "" /f
call :reg add "%classes_root_key%\SystemFileAssociations\audio\OpenWithList\mpv.exe" /d "" /f

:: Add DVD AutoPlay handler
set autoplay_key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers
call :reg add "%classes_root_key%\io.mpv.dvd\shell\play" /d "&Play" /f
call :reg add "%classes_root_key%\io.mpv.dvd\shell\play\command" /d "\"%mpv_path%\" %mpv_args% dvd:// --dvd-device=\"%%%%L\"" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayDVDMovieOnArrival" /v "Action" /d "Play DVD movie" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayDVDMovieOnArrival" /v "DefaultIcon" /d "%mpv_path%,0" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayDVDMovieOnArrival" /v "InvokeProgID" /d "io.mpv.dvd" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayDVDMovieOnArrival" /v "InvokeVerb" /d "play" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayDVDMovieOnArrival" /v "Provider" /d "mpv" /f
call :reg add "%autoplay_key%\EventHandlers\PlayDVDMovieOnArrival" /v "MpvPlayDVDMovieOnArrival" /f

:: Add Blu-ray AutoPlay handler
call :reg add "%classes_root_key%\io.mpv.bluray\shell\play" /d "&Play" /f
call :reg add "%classes_root_key%\io.mpv.bluray\shell\play\command" /d "\"%mpv_path%\" %mpv_args% bd:// --bluray-device=\"%%%%L\"" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayBluRayOnArrival" /v "Action" /d "Play Blu-ray movie" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayBluRayOnArrival" /v "DefaultIcon" /d "%mpv_path%,0" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayBluRayOnArrival" /v "InvokeProgID" /d "io.mpv.bluray" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayBluRayOnArrival" /v "InvokeVerb" /d "play" /f
call :reg add "%autoplay_key%\Handlers\MpvPlayBluRayOnArrival" /v "Provider" /d "mpv" /f
call :reg add "%autoplay_key%\EventHandlers\PlayBluRayOnArrival" /v "MpvPlayBluRayOnArrival" /f

:: Add a capabilities key for mpv, which is registered later on for use in the
:: "Default Programs" control panel
set capabilities_key=HKLM\SOFTWARE\Clients\Media\mpv\Capabilities
call :reg add "%capabilities_key%" /v "ApplicationName" /d "mpv" /f
call :reg add "%capabilities_key%" /v "ApplicationDescription" /d "mpv media player" /f

:: Add file types
set supported_types_key=%app_key%\SupportedTypes
set file_associations_key=%capabilities_key%\FileAssociations
:: DVD/Blu-ray audio formats
call :add_type "audio/ac3"                        "62"  "audio" "AC-3 Audio"                 ".ac3" ".a52"
call :add_type "audio/eac3"                       "0"   "audio" "E-AC-3 Audio"               ".eac3"
call :add_type "audio/vnd.dolby.mlp"              "0"   "audio" "MLP Audio"                  ".mlp"
call :add_type "audio/vnd.dts"                    "67"  "audio" "DTS Audio"                  ".dts"
call :add_type "audio/vnd.dts.hd"                 "0"   "audio" "DTS-HD Audio"               ".dts-hd" ".dtshd"
call :add_type ""                                 "0"   "audio" "TrueHD Audio"               ".true-hd" ".thd" ".truehd" ".thd+ac3"
call :add_type ""                                 "0"   "audio" "True Audio"                 ".tta"
:: Uncompressed formats
call :add_type ""                                 "0"   "audio" "PCM Audio"                  ".pcm"
call :add_type "audio/wav"                        "70"  "audio" "Wave Audio"                 ".wav"
call :add_type "audio/aiff"                       "0"   "audio" "AIFF Audio"                 ".aiff" ".aif" ".aifc"
call :add_type "audio/amr"                        "46"  "audio" "AMR Audio"                  ".amr"
call :add_type "audio/amr-wb"                     "0"   "audio" "AMR-WB Audio"               ".awb"
call :add_type "audio/basic"                      "0"   "audio" "AU Audio"                   ".au" ".snd"
call :add_type ""                                 "0"   "audio" "Linear PCM Audio"           ".lpcm"
call :add_type ""                                 "0"   "video" "Raw YUV Video"              ".yuv"
call :add_type ""                                 "0"   "video" "YUV4MPEG2 Video"            ".y4m"
:: Free lossless formats
call :add_type "audio/x-ape"                      "64"  "audio" "Monkey's Audio"             ".ape"
call :add_type "audio/x-wavpack"                  "0"   "audio" "WavPack Audio"              ".wv"
call :add_type "audio/x-shorten"                  "0"   "audio" "Shorten Audio"              ".shn"
:: MPEG formats
call :add_type "video/vnd.dlna.mpeg-tts"          "77"  "video" "MPEG-2 Transport Stream"    ".m2ts" ".m2t" ".mts" ".mtv" ".ts" ".tsv" ".tsa" ".tts" ".trp"
call :add_type "audio/vnd.dlna.adts"              "0"   "audio" "ADTS Audio"                 ".adts" ".adt"
call :add_type "audio/mpeg"                       "48"  "audio" "MPEG Audio"                 ".mpa" ".m1a" ".m2a" ".mp1" ".mp2"
call :add_type "audio/mpeg"                       "60"  "audio" "MP3 Audio"                  ".mp3"
call :add_type "video/mpeg"                       "13"  "video" "MPEG Video"                 ".mpeg" ".mpg" ".mpe" ".mpeg2" ".m1v" ".m2v" ".mp2v" ".mpv" ".mpv2" ".mod" ".tod"
call :add_type "video/dvd"                        "18"  "video" "Video Object"               ".vob" ".vro"
call :add_type ""                                 "0"   "video" "Enhanced VOB"               ".evob" ".evo"
call :add_type "video/mp4"                        "25"  "video" "MPEG-4 Video"               ".mpeg4" ".m4v" ".mp4" ".mp4v" ".mpg4"
call :add_type "audio/mp4"                        "51"  "audio" "MPEG-4 Audio"               ".m4a"
call :add_type "audio/aac"                        "63"  "audio" "Raw AAC Audio"              ".aac"
call :add_type ""                                 "0"   "video" "Raw H.264/AVC Video"        ".h264" ".avc" ".x264" ".264"
call :add_type ""                                 "0"   "video" "Raw H.265/HEVC Video"       ".hevc" ".h265" ".x265" ".265"
:: Xiph formats
call :add_type "audio/flac"                       "68"  "audio" "FLAC Audio"                 ".flac"
call :add_type "audio/ogg"                        "61"  "audio" "Ogg Audio"                  ".oga" ".ogg"
call :add_type "audio/ogg"                        "0"   "audio" "Opus Audio"                 ".opus"
call :add_type "audio/ogg"                        "0"   "audio" "Speex Audio"                ".spx"
call :add_type "video/ogg"                        "19"  "video" "Ogg Video"                  ".ogv" ".ogm"
call :add_type "application/ogg"                  "0"   "video" "Ogg Video"                  ".ogx"
:: Matroska formats
call :add_type "video/x-matroska"                 "20"  "video" "Matroska Video"             ".mkv"
call :add_type "video/x-matroska"                 "0"   "video" "Matroska 3D Video"          ".mk3d"
call :add_type "audio/x-matroska"                 "69"  "audio" "Matroska Audio"             ".mka"
call :add_type "video/webm"                       "0"   "video" "WebM Video"                 ".webm"
call :add_type "audio/webm"                       "0"   "audio" "WebM Audio"                 ".weba"
:: Misc formats
call :add_type "video/avi"                        "1"   "video" "Video Clip"                 ".avi" ".vfw"
call :add_type ""                                 "2"   "video" "DivX Video"                 ".divx"
call :add_type ""                                 "0"   "video" "3ivx Video"                 ".3iv"
call :add_type ""                                 "0"   "video" "XVID Video"                 ".xvid"
call :add_type ""                                 "0"   "video" "NUT Video"                  ".nut"
call :add_type "video/flc"                        "0"   "video" "FLIC Video"                 ".flic" ".fli" ".flc"
call :add_type ""                                 "0"   "video" "Nullsoft Streaming Video"   ".nsv"
call :add_type "application/gxf"                  "0"   "video" "General Exchange Format"    ".gxf"
call :add_type "application/mxf"                  "0"   "video" "Material Exchange Format"   ".mxf"
:: Windows Media formats
call :add_type "audio/x-ms-wma"                   "47"  "audio" "Windows Media Audio"        ".wma"
call :add_type "video/x-ms-wm"                    "5"   "video" "Windows Media Video"        ".wm"
call :add_type "video/x-ms-wmv"                   "7"   "video" "Windows Media Video"        ".wmv"
call :add_type "video/x-ms-asf"                   "3"   "video" "Windows Media Video"        ".asf"
call :add_type ""                                 "0"   "video" "Microsoft Recorded TV Show" ".dvr-ms" ".dvr"
call :add_type ""                                 "0"   "video" "Windows Recorded TV Show"   ".wtv"
:: DV formats
call :add_type ""                                 "0"   "video" "DV Video"                   ".dv" ".hdv"
:: Flash Video formats
call :add_type "video/x-flv"                      "32"  "video" "Flash Video"                ".flv"
call :add_type "video/mp4"                        "0"   "video" "Flash Video"                ".f4v"
call :add_type "audio/mp4"                        "0"   "audio" "Flash Audio"                ".f4a"
:: QuickTime formats
call :add_type "video/quicktime"                  "23"  "video" "QuickTime Video"            ".qt" ".mov"
call :add_type "video/quicktime"                  "23"  "video" "QuickTime HD Video"         ".hdmov"
:: Real Media formats
call :add_type "application/vnd.rn-realmedia"     "21"  "video" "Real Media Video"           ".rm"
call :add_type "application/vnd.rn-realmedia-vbr" "22"  "video" "Real Media Video"           ".rmvb"
call :add_type "audio/vnd.rn-realaudio"           "52"  "audio" "Real Media Audio"           ".ra" ".ram"
:: 3GPP formats
call :add_type "audio/3gpp"                       "0"   "audio" "3GPP Audio"                 ".3ga"
call :add_type "audio/3gpp2"                      "0"   "audio" "3GPP Audio"                 ".3ga2"
call :add_type "video/3gpp"                       "0"   "video" "3GPP Video"                 ".3gpp" ".3gp"
call :add_type "video/3gpp2"                      "42"  "video" "3GPP Video"                 ".3gp2" ".3g2"
:: Video game formats
call :add_type ""                                 "0"   "audio" "AY Audio"                   ".ay"
call :add_type ""                                 "0"   "audio" "GBS Audio"                  ".gbs"
call :add_type ""                                 "0"   "audio" "GYM Audio"                  ".gym"
call :add_type ""                                 "0"   "audio" "HES Audio"                  ".hes"
call :add_type ""                                 "0"   "audio" "KSS Audio"                  ".kss"
call :add_type ""                                 "0"   "audio" "NSF Audio"                  ".nsf"
call :add_type ""                                 "0"   "audio" "NSFE Audio"                 ".nsfe"
call :add_type ""                                 "0"   "audio" "SAP Audio"                  ".sap"
call :add_type ""                                 "0"   "audio" "SPC Audio"                  ".spc"
call :add_type ""                                 "0"   "audio" "VGM Audio"                  ".vgm"
call :add_type ""                                 "0"   "audio" "VGZ Audio"                  ".vgz"
:: Playlist formats
call :add_type "audio/x-mpegurl"                  "53"  "audio" "M3U Playlist"               ".m3u" ".m3u8"
call :add_type "audio/x-scpls"                    "54"  "audio" "PLS Playlist"               ".pls"
call :add_type ""                                 "0"   "audio" "CUE Sheet"                  ".cue"

:: Register "Default Programs" entry
call :reg add "HKLM\SOFTWARE\RegisteredApplications" /v "mpv" /d "SOFTWARE\Clients\Media\mpv\Capabilities" /f

:: Add start menu link
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%ProgramData%\Microsoft\Windows\Start Menu\Programs\mpv.lnk');$s.TargetPath='%mpv_path%';$s.Save()"

echo.
echo Installed successfully^^! You can now configure mpv's file associations in the
echo Default Programs control panel.
echo.
if [%unattended%] == [yes] exit 0
<nul set /p =Press any key to open the Default Programs control panel . . .
pause >nul
control /name Microsoft.DefaultPrograms
exit 0

:die
	if not [%1] == [] echo %~1
	if [%unattended%] == [yes] exit 1
	pause
	exit 1

:ensure_admin
	:: 'openfiles' is just a commmand that is present on all supported Windows
	:: versions, requires admin privileges and has no side effects, see:
	:: https://stackoverflow.com/questions/4051883/batch-script-how-to-check-for-admin-rights
	openfiles >nul 2>&1
	if errorlevel 1 (
		echo This batch script requires administrator privileges. Right-click on
		echo mpv-install.bat and select "Run as administrator".
		call :die
	)
	goto :EOF

:ensure_vista
	ver | find "XP" >nul
	if not errorlevel 1 (
		echo This batch script only works on Windows Vista and later. To create file
		echo associations on Windows XP, right click on a video file and use "Open with...".
		call :die
	)
	goto :EOF

:reg
	:: Wrap the reg command to check for errors
	>nul reg %*
	if errorlevel 1 set error=yes
	if [%error%] == [yes] echo Error in command: reg %*
	if [%error%] == [yes] call :die
	goto :EOF

:reg_set_opt
	:: Set a value in the registry if it doesn't already exist
	set key=%~1
	set value=%~2
	set data=%~3

	reg query "%key%" /v "%value%" >nul 2>&1
	if errorlevel 1 call :reg add "%key%" /v "%value%" /d "%data%"
	goto :EOF

:add_verbs
	set key=%~1

	:: Set the default verb to "play"
	call :reg add "%key%\shell" /d "play" /f

	:: Hide the "open" verb from the context menu, since it's the same as "play"
	call :reg add "%key%\shell\open" /v "LegacyDisable" /f

	:: Set open command
	call :reg add "%key%\shell\open\command" /d "\"%mpv_path%\" %mpv_args% -- \"%%%%L\"" /f

	:: Add "play" verb
	call :reg add "%key%\shell\play" /d "&Play" /f
	call :reg add "%key%\shell\play\command" /d "\"%mpv_path%\" %mpv_args% -- \"%%%%L\"" /f

	goto :EOF

:add_progid
	set prog_id=%~1
	set friendly_name=%~2
	set icon_key=%~3

	:: Add ProgId, edit flags are FTA_OpenIsSafe
	set prog_id_key=%classes_root_key%\%prog_id%
	call :reg add "%prog_id_key%" /d "%friendly_name%" /f
	call :reg add "%prog_id_key%" /v "EditFlags" /t REG_DWORD /d 65536 /f
	call :reg add "%prog_id_key%" /v "FriendlyTypeName" /d "%friendly_name%" /f
	call :reg add "%prog_id_key%\DefaultIcon" /d "%icon_key%" /f
	call :add_verbs "%prog_id_key%"

	goto :EOF

:update_extension
	set extension=%~1
	set prog_id=%~2
	set mime_type=%~3
	set perceived_type=%~4

	:: Add information about the file extension, if not already present
	set extension_key=%classes_root_key%\%extension%
	if not [%mime_type%] == [] call :reg_set_opt "%extension_key%" "Content Type" "%mime_type%"
	if not [%perceived_type%] == [] call :reg_set_opt "%extension_key%" "PerceivedType" "%perceived_type%"
	call :reg add "%extension_key%\OpenWithProgIds" /v "%prog_id%" /f

	:: Add type to SupportedTypes
	call :reg add "%supported_types_key%" /v "%extension%" /f

	:: Add type to the Default Programs control panel
	call :reg add "%file_associations_key%" /v "%extension%" /d "%prog_id%" /f

	goto :EOF

:add_type
	set mime_type=%~1
	set icon_id=%~2
	set perceived_type=%~3
	set friendly_name=%~4
	set extension=%~5

	echo Adding "%extension%" file type

	:: Add ProgId
	set prog_id=io.mpv%extension%
	set icon_key=%icon_path%,%icon_id%
	call :add_progid "%prog_id%" "%friendly_name%" "%icon_key%"

	:: Add extensions
	:extension_loop
		call :update_extension "%extension%" "%prog_id%" "%mime_type%" "%perceived_type%"

		:: Trailing parameters are additional extensions
		shift /4
		set extension=%~4
		if not [%extension%] == [] goto extension_loop

	goto :EOF
2 个赞

话虽如此,我感觉POT的也不好看

pot的图标资源挺多的,网上找找会有惊喜。

我觉得用视频缩略图就挺好的,没必要区分格式

这套图标挺不错的

2 个赞

赞,提交给官方?

不是没意愿。

Personally I disagree, but do feel free to suggest a different one, and then convince everyone else that your icon is nicer than the current one. Till then though, closing.

随意提交,只要你能说服社区大多数人。

谢谢分享,

"&Play"

还可以改进为

"使用 MPV 播放 (&P)"