查看: 2584|回复: 2
收起左侧

[资源] [批处理]重建图标缓存和关闭操作中心

[复制链接]
os52
发表于 2016-8-24 15:45:43 | 显示全部楼层 |阅读模式
本帖最后由 os52 于 2016-8-24 16:07 编辑

Also available on github https://gist.github.com/myfreeer/1c4a1ce37161e288cf01c5e52b879e05
注:经测试完全可用,测试环境server 2012r2(即win8.1),无安全类软件

重建图标缓存和关闭操作中心
  1. @echo off
  2. taskkill /f /im explorer.exe
  3. reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f
  4. REG ADD HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer /v DisableNotificationCenter /t REG_DWORD /d 1 /f
  5. REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f /v HideSCAHealth /t REG_DWORD /d 1
  6. REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f /v HideSCAHealth /t REG_DWORD /d 1
  7. for %%i in (
  8. %USERPROFILE%\AppData\Local\Microsoft\Windows\Explorer
  9. %USERPROFILE%\AppData\Local\IconCache.db
  10. ) do (
  11. attrib -r -s -h %%i /D /S
  12. del %%i /f /s /q
  13. )
  14. ::timeout /t 1
  15. cd /d %SystemRoot%\System32
  16. start explorer
  17. exit
复制代码


仅重建图标缓存
  1. @echo off
  2. taskkill /f /im explorer.exe
  3. reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams /f
  4. for %%i in (
  5. %USERPROFILE%\AppData\Local\Microsoft\Windows\Explorer
  6. %USERPROFILE%\AppData\Local\IconCache.db
  7. ) do (
  8. attrib -r -s -h %%i /D /S
  9. del %%i /f /s /q
  10. )
  11. ::timeout /t 1
  12. cd /d %SystemRoot%\System32
  13. start explorer
  14. exit
复制代码


仅关闭操作中心
  1. @echo off
  2. taskkill /f /im explorer.exe
  3. REG ADD HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer /v DisableNotificationCenter /t REG_DWORD /d 1 /f
  4. REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f /v HideSCAHealth /t REG_DWORD /d 1
  5. REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /f /v HideSCAHealth /t REG_DWORD /d 1
  6. ::timeout /t 1
  7. cd /d %SystemRoot%\System32
  8. start explorer
  9. exit
复制代码
jeffwong
发表于 2016-8-24 16:09:28 | 显示全部楼层
win10可以吗
os52
 楼主| 发表于 2016-8-24 16:34:18 | 显示全部楼层
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-5-3 13:41 , Processed in 0.113063 second(s), 16 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表