windows 无法默认用图片查看器打开图片
一 批处理
@echo off&cd\&color 0a&cls
echo 恢复Win10照片查看器
reg add "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" /v ".jpg" /t REG_SZ /d PhotoViewer.FileAssoc.Tiff /f
reg add "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" /v ".jpeg" /t REG_SZ /d PhotoViewer.FileAssoc.Tiff /f
reg add "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" /v ".bmp" /t REG_SZ /d PhotoViewer.FileAssoc.Tiff /f
reg add "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations" /v ".png" /t REG_SZ /d PhotoViewer.FileAssoc.Tiff /f
echo 请双击或右击图片,选择“照片查看器”即可
pause
二、修改注册表
在打开的注册表编辑器中,从左侧依次展开:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations:
模仿 .tif 添加 .jpeg、.bmp、.png等图片字符串值并都设置“数值数据”为“PhotoViewer.FileAssoc.Tiff”: