一键清除系统自带图片查看器、WMPlayer格式关联

查看 106|回复 7
作者:onlychinese   
   
系统自带的图片查看器、WMPlayer支持格式不多、性能不好、操作不顺,人人得而删之。
最佳取代者为:看图 CPix、ColorStorm;视频 MPC-BE
[ol]@echo off
Setlocal EnableDelayedExpansion
:WMP
for %%a in (audio AudioCD BurnCD image video Device Device.1 Directory.Audio Directory.Image Directory.Video DVD DVR-MSFile PlayCD PlayMedia Stack.Audio VCD WMDBFile WTVFile) do (
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\OpenWithList\wmplayer.exe" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\shellex\ContextMenuHandlers" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\shell\Enqueue" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\shell\printto" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\shell\print" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\%%a\shell\Play" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\%%a\shellex\ContextMenuHandlers" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\%%a\shell" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\WMP.%%b" /f >nul 2>nul
)
for %%c in (3g2 3gp 3gp2 3gpp aac ac3 adts aif aiff aifc alac amr ape asf asx au avi bdmv cda divx dts f4v flac flv h264 h265 hdmov m2t m2ts mts m2v m3u m3u8 m4a m4v mid midi mk3d mka mkv mod mov mp3 mp4 mp4v mpeg mpg ogg opus swf ts vc1 wav webm wma wms wmv wpl wv xvid) do (
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%a" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\.%%c\shellex\ContextMenuHandlers" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\.%%c" /f /v "PreviewDetails" >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\.%%c" /f /v "FullDetails" >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\WMP11.AssocFile.%%c" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\WMP10.AssocFile.%%c" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%c\OpenWithProgIds" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%c\OpenWithList" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%c" /f /ve >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\%%cFile\shellex" /f >nul 2>nul
)
:PhotoViewer
regsvr32.exe /s /u "%ProgramFiles%\Windows Photo Viewer\photoviewer.dll"
regsvr32.exe /s /u "%ProgramFiles(x86)%\Windows Photo Viewer\photoviewer.dll"
for /f "delims=\ tokens=5" %%a in ('reg query "HKLM\SOFTWARE\Classes\CLSID" /s /d /f "PhotoViewer" 2^>nul') do (
        reg delete "HKLM\SOFTWARE\Classes\WOW6432Node\CLSID\%%a" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\CLSID\%%a" /f >nul 2>nul
)
for %%a in (avci avif bmp gif heic heif ico jfif jpe jpeg jpg jxr pic png psd psp raw rle tif tiff webp) do (
        reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.%%a" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\SystemFileAssociations\.%%a" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\PhotoViewer.FileAssoc.%%a" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\%%aImage.Document\shell\open" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%a\OpenWithList\MSPaint.exe" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%a\OpenWithProgids" /f >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%afile" /f /ve >nul 2>nul
        reg delete "HKLM\SOFTWARE\Classes\.%%a" /f /ve >nul 2>nul
)
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqDeviceSelectionDlg" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqDeviceSelectionDlg.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqDropTarget" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqDropTarget.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqHWEventHandler" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqHWEventHandler.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqOptionsDlg" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcqOptionsDlg.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcquire" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoAcquire.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoManager.imagetype" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoManager.panotype" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoManager.videotype" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoProgressDialog" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.PhotoProgressDialog.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.Photos.ViewerDropTarget" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.Photos.ViewerDropTarget.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.Photos.ViewerGalleryInterface" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Microsoft.Photos.ViewerGalleryInterface.1" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\CLSID\{32624F4B-F1D5-4877-989E-555640109D2B}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\CLSID\{76D0CB12-7604-4048-B83C-1005C7DDC503}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\CLSID\{E598560B-28D5-46aa-A14A-8A3BEA34B576}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\CLSID\{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\WOW6432Node\CLSID\{32624F4B-F1D5-4877-989E-555640109D2B}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\WOW6432Node\CLSID\{76D0CB12-7604-4048-B83C-1005C7DDC503}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\WOW6432Node\CLSID\{E598560B-28D5-46aa-A14A-8A3BEA34B576}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\WOW6432Node\CLSID\{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Classes\Applications\photoviewer.dll" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows Photo Viewer" /f >nul 2>nul
reg delete "HKCU\Software\Microsoft\Windows Photo Viewer" /f >nul 2>nul
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{8DD448E6-C188-4aed-AF92-44956194EB1F}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{CE3FB1D1-02AE-4a5f-A6E9-D9F1B4073E6C}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{08165EA0-E946-11CF-9C87-00AA005127ED}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{0F8604A5-4ECE-4DE1-BA7D-CF10F8AA4F48}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{13D3C4B8-B179-4ebb-BF62-F704173E7448}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{7FC0B86E-5FA7-11d1-BC7C-00C04FD929DB}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{8082C5E6-4C27-48ec-A809-B8E1122E8F97}"
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" /f /v "{E6FB5E20-DE35-11CF-9C87-00AA005127ED}"
[/ol]复制代码

查看器, 系统自带, 格式

awan8850   
感谢分享!!!
reuk   
感谢分享!
lgr99   
感谢分享
reuk   
请问怎么用批处理加默认打开程序呢,刚好在弄这个问题
比如程序在d:\xnview\xnview2.53.exe,图片格式jpg,png这些怎么添加默认打开
reuk   
感谢分享 这个不错
lgr99   

reuk 发表于 2023-10-1 18:50
请问怎么用批处理加默认打开程序呢,刚好在弄这个问题
比如程序在d:\xnview\xnview2.53.exe,图片格式jpg, ...

下面供参考:
@echo Off
::【关联:用 “fscapture97” 打开.gif】【放在  fscapture.exe 目录】
REG add HKCR\.gif /ve /t REG_SZ /d "giffile" /f
assoc .gif
ftype giffile="%~dp0fscapture.exe" "%%1"
exit
lgr99   
问题是系统流氓 会自己改回去
您需要登录后才可以回帖 登录 | 立即注册

返回顶部