کد:
@echo off
cls
set regPath=HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify
set regKey1=IconStreams
set regKey2=PastIconsStream
echo The Explorer process must be killed to reset the Notification Area Icons Cache.
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 confirm-restart
:iconstreams
reg delete "%regpath%" /f /v "%regkey1%"
goto verify-PastIconsStream
:PastIconsStream
reg delete "%regpath%" /f /v "%regkey2%"
:confirm-restart
echo.
echo Windows must be restarted to finish resetting the Notification Area Icons.
echo.
echo Restart now? (Y/N) and press Enter:
set /p choice=
If %choice% == y goto restart
echo.
echo Restart aborted...please close this window
explorer.exe
:restart
shutdown /r /t 0
exit
علاقه مندی ها (بوک مارک ها)