Created
June 23, 2024 10:31
-
-
Save punkmonday/99617c8a49d5be77f08e415c0e233030 to your computer and use it in GitHub Desktop.
重置win10任务栏通知栏图标_解决v2rayN图标不显示问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Created by: Shawn Brink | |
:: http://www.tenforums.com | |
:: Tutorial: http://www.tenforums.com/tutorials/5662-notification-area-icons-reset-windows-10-a.html | |
@echo off | |
set regPath=HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify | |
set regKey1=IconStreams | |
set regKey2=PastIconsStream | |
echo. | |
echo The Explorer process must be temporarily killed before deleting your notification area icons cache. | |
echo. | |
echo Please SAVE ALL OPEN WORK before continuing. | |
echo. | |
pause | |
echo. | |
taskkill /IM explorer.exe /F | |
echo. | |
FOR /F "tokens=*" %%a in ('Reg Query "%regpath%" /v %regkey1% ^| find /i "%regkey1%"') do goto IconStreams | |
echo Registry key "IconStreams" already deleted. | |
echo. | |
:verify-PastIconsStream | |
FOR /F "tokens=*" %%a in ('Reg Query "%regpath%" /v %regkey2% ^| find /i "%regkey2%"') do goto PastIconsStream | |
echo Registry key "PastIconsStream" already deleted. | |
echo. | |
goto restart | |
:IconStreams | |
reg delete "%regpath%" /f /v "%regkey1%" | |
goto verify-PastIconsStream | |
:PastIconsStream | |
reg delete "%regpath%" /f /v "%regkey2%" | |
:restart | |
echo. | |
echo. | |
echo You will need to restart the PC to finish resetting your notification area icons. | |
echo. | |
CHOICE /C:YN /M "Do you want to restart the PC now?" | |
IF ERRORLEVEL 2 goto no | |
IF ERRORLEVEL 1 goto yes | |
:no | |
echo. | |
echo. | |
echo Restarting explorer.... | |
echo. | |
echo Please remember to restart the PC later to finish resetting your notification area icons. | |
echo. | |
start explorer.exe | |
pause | |
exit /B | |
:yes | |
shutdown /r /f /t 00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment