標籤

bat (52) 作品 (38) python (21) shell (17) windows (11) 虛擬機 (11) php (10) CPP (6) KMS (6) 程式設計 (6) docker (5) 使用教學 (5) xoops (4) 公文 (4) Apache2 (3) Excel (3) juniper (3) 資料庫 (3) mysql (2) 免動手 (2) 資料結構 (2) 軟體廣播 (2) 電腦維修 (2) Android Studio (1) Apple IPAD管理 (1) Arduino (1) CSS (1) LAMP (1) NAS (1) Ubuntu (1) VHD (1) Windows Server (1) 原因 (1) 程式應用 (1) 程式積木 (1) 編輯器 (1) 雲端硬碟 (1)

2022年12月19日 星期一

只要點兩下,就能讓Win10擁有相片檢視器且完成觀看LINE下載圖片的設定


       自從發表只要變更設定,就能讓相片顯示器可以看LINE下載的圖片後,心想可不可以[只要點兩下,就能讓Win10擁有相片檢視器且完成後續設定]。不然,經過系列文章1、2之後,點完兩下後,還要做設定。覺得很麻煩,一點都不方便。有沒有更快的方法?
下載檔案解壓密碼:demo1234
使用步驟教學:

       看完資料來源1.[Fix] Error “Windows Photo Viewer can’t display this picture”後,發現底下有一行字關於Registry。其內容如下:
Windows Registry Editor Version 5.00

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ICM\RegisteredProfiles]
"sRGB"="RSWOP.icm"
好奇的我就同時打開Regedit,將HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ICM\RegisteredProfiles貼上

 
與控制台->色彩管理->進階,進行比對。
比對之後,發現 
,這樣我真的太高興了,這樣我就可以寫進BAT。
 
程式目的:只要點兩下,就能讓Win10擁有相片檢視器且完成後續設定
檔案名稱:PhotoViewerAndColorManagementSetting.BAT
檔案內容:
 @echo off
REM ---------------以下是程式碼,不需更改---------------
REM :: BatchGotAdmin (Run as Admin code starts)
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
REM :: BatchGotAdmin (Run as Admin code ends)
REM :: Your codes should start from the following line
REM 設定照片檢視器 PhotoViewerSetting
set regpath=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations
@reg add "%regpath%" /v ".jpeg" /d "PhotoViewer.FileAssoc.Tiff" /t REG_SZ /f
@reg add "%regpath%" /v ".jpg" /d "PhotoViewer.FileAssoc.Tiff" /t REG_SZ /f
@reg add "%regpath%" /v ".png" /d "PhotoViewer.FileAssoc.Tiff" /t REG_SZ /f
@reg add "%regpath%" /v ".bmp" /d "PhotoViewer.FileAssoc.Tiff" /t REG_SZ /f
REM 設定顏色管理 ColorManagementSetting
set regpath=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ICM\RegisteredProfiles
@reg add "%regpath%" /v "sRGB" /d "RSWOP.icm" /t REG_SZ /f
pause
exit

資料來源:
1.[Fix] Error “Windows Photo Viewer can’t display this picture”
https://www.winhelponline.com/blog/error-windows-photo-viewer-cant-display-this-picture-no-memory/

沒有留言:

張貼留言

只要點兩下,傳統右鍵選單改回Win11右鍵選單

系列文章: 1. 只要點兩下,就能將Win11 右鍵選單 回復 傳統右鍵選單 2. 只要點兩下,傳統右鍵選單改回Win11右鍵選單 上一篇提到只要點兩下,就能將Win11選單回到傳統選單。但是有沒有方法能夠回到Win11選單呢?                    ...