英文:
Batch file to resort to Windows Photo Viewer
问题
Windows 10.
Microsoft不断删除我设置为Windows照片查看器的默认照片查看器。
是否有批处理文件可以恢复此设置?
英文:
Windows 10.
Microsoft continuously keep removing the default photo viewer which I have set to Windows Photo Viewer.
Is there a batch file that will restore this setting?
答案1
得分: 1
批处理文件修改必要的注册表值,将Windows照片查看器设置为各种图像文件扩展名(例如.bmp、.jpg、.png)的默认照片查看器。运行批处理文件后,Windows照片查看器应该恢复为这些文件类型的默认照片查看器。
@echo off
REM 将Windows照片查看器恢复为默认照片查看器
REM 为Windows照片查看器设置必要的注册表值
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Bitmap" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dib\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Bitmap" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.GIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpe\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jfif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Png" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Tiff" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tiff\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Tiff" /f
echo Windows照片查看器已恢复为默认照片查看器。
pause
英文:
The batch file modifies the necessary registry values to set Windows Photo Viewer as the default photo viewer for various image file extensions (e.g., .bmp, .jpg, .png). After running the batch file, Windows Photo Viewer should be restored as the default photo viewer for those file types.
@echo off
REM Restoring Windows Photo Viewer as the default photo viewer
REM Set the necessary registry values for Windows Photo Viewer
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Bitmap" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dib\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Bitmap" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.GIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpe\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jfif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.JFIF" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Png" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Tiff" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tiff\UserChoice" /v Progid /d "PhotoViewer.FileAssoc.Tiff" /f
echo Windows Photo Viewer has been restored as the default photo viewer.
pause
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论