Skip to content

Instantly share code, notes, and snippets.

@xyuanmu
Created May 17, 2017 12:55
Show Gist options
  • Save xyuanmu/43f9e33135e4e9fc9fedeb199c43d210 to your computer and use it in GitHub Desktop.
Save xyuanmu/43f9e33135e4e9fc9fedeb199c43d210 to your computer and use it in GitHub Desktop.
用于关联 Picasa3 的图片查看器 PicasaPhotoViewer,将此批处理放于 PicasaPhotoViewer.exe 所在目录双击即可。
@echo off
echo.
echo.本工具将自动卸载 PicasaPhotoViewer ...
reg delete "HKLM\SOFTWARE\Classes\PicasaPhotoViewer" /F >NUL 2>NUL
reg delete "HKLM\SOFTWARE\RegisteredApplications" /V "Picasa3" /F >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Picasa3" /F >NUL 2>NUL
echo.
echo.卸载完成, 3秒后自动退出...
choice /t 3 /d y /n >NUL
exit
@echo off & cd /d %~dp0
SET P=%~dp0PicasaPhotoViewer.exe
echo.
echo.本工具将自动注册 Picasa3 所支持的图片格式, 除了gif格式。
reg add "HKLM\SOFTWARE\Classes\PicasaPhotoViewer\Shell\Open\Command" /D "\"%P%\" \"%%1\"" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Classes\PicasaPhotoViewer\DefaultIcon" /D "\"%P%\",-102" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\RegisteredApplications" /V "Picasa3" /D "SOFTWARE\\Picasa3\\Capabilities" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3" /V "InstallDir" /D ""%~dp0"" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities" /V "ApplicationName" /D "Picasa Photo Viewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities" /V "ApplicationDescription" /D "Picasa 是由 Google 提供的免费照片软件。" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".tiff" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".tif" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".tga" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".raw" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".png" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".jpg" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".jpeg" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".jpe" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".gif" /D "PicasaPhotoViewer" /F >NUL 2>NUL
reg add "HKLM\SOFTWARE\Picasa3\Capabilities\FileAssociations" /V ".bmp" /D "PicasaPhotoViewer" /F >NUL 2>NUL
echo.
echo.注册完成, 3秒后自动退出...
choice /t 3 /d y /n >NUL
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment