[关闭]
@ferstar 2015-11-10T16:57:31.000000Z 字数 8244 阅读 4717

win10 自用的一套优化方案

OS WIN


脚本

  1. @ECHO off
  2. ECHO 桌面显示我的电脑、网络、用户
  3. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /d 0 /t REG_DWORD /f
  4. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /d 0 /t REG_DWORD /f
  5. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /d 0 /t REG_DWORD /f
  6. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /d 0 /t REG_DWORD /f
  7. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /d 0 /t REG_DWORD /f
  8. reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /d 0 /t REG_DWORD /f
  9. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /ve /t REG_SZ /d 我的电脑 /f
  10. echo 完成
  11. ECHO 资源管理器打开为我的电脑
  12. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /d 1 /t REG_DWORD /f
  13. echo 完成
  14. ECHO 增大图标缓存,防止图标丢失
  15. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer" /v "Max Cached Icons" /d 2000 /t REG_SZ /f
  16. echo 完成
  17. ECHO 设置记事本
  18. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad" /v fwrap /d 1 /t REG_DWORD /f
  19. reg add "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad" /v StatusBar /d 1 /t REG_DWORD /f
  20. echo 完成
  21. ECHO 关闭Windows Defender
  22. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /d 1 /t REG_DWORD /f
  23. echo 完成
  24. ECHO 关闭Windows防火墙
  25. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" /v "EnableFirewall" /d 0 /t REG_DWORD /f
  26. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PrivateProfile" /v "EnableFirewall" /d 0 /t REG_DWORD /f
  27. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\PublicProfile" /v "EnableFirewall" /d 0 /t REG_DWORD /f
  28. sc stop MpsSvc MpsSvc & sc config MpsSvc start=disabled
  29. echo 完成
  30. ECHO 关闭用户账户控制(UAC)
  31. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /d 0 /t REG_DWORD /f
  32. echo 完成
  33. ECHO 关闭Smartscreen应用筛选器
  34. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /d off /t REG_SZ /f
  35. echo 完成
  36. ECHO 延迟启动 Superfetch 服务
  37. sc config "SysMain" start= delayed-auto
  38. echo 完成
  39. ECHO 关闭自动播放
  40. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /d 255 /t REG_DWORD /f
  41. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /d 255 /t REG_DWORD /f
  42. echo 完成
  43. ECHO 关机时强制杀后台不等待
  44. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /d 0 /t REG_SZ /f
  45. echo 完成
  46. ECHO 启用防火墙Windows Firewall服务(并非启用防火墙)
  47. sc config MpsSvc start= auto
  48. net start MpsSvc
  49. echo 完成
  50. ECHO 关闭远程协助
  51. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Remote Assistance" /v "fAllowToGetHelp" /d 0 /t REG_dword /f
  52. echo 完成
  53. ECHO 清除右键多余菜单
  54. regsvr32 /u /s igfxpph.dll
  55. reg delete HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers /f
  56. reg add HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\new /ve /d {D969A300-E7FF-11d0-A93B-00A0C90F2719}
  57. reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v HotKeysCmds /f
  58. reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IgfxTray /f
  59. echo 完成
  60. ECHO 去除快捷方式后缀
  61. reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" /v link /d "00000000" /t REG_BINARY /f
  62. del "%userprofile%\AppData\Local\iconcache.db" /f /q
  63. echo 完成
  64. ECHO 去除UAC小盾牌
  65. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 77 /d "%systemroot%\system32\imageres.dll,197" /t reg_sz /f
  66. taskkill /f /im explorer.exe
  67. attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"
  68. del "%userprofile%\AppData\Local\iconcache.db" /f /q
  69. start explorer
  70. echo 完成
  71. ECHO 设置系统自带截屏保存到桌面
  72. rd /s /q %userprofile%\pictures\Screenshots
  73. mklink /j %userprofile%\pictures\Screenshots %userprofile%\desktop
  74. echo 完成
  75. ECHO 设置开机按F8键直接进入安全模式
  76. bcdedit /set {default} bootmenupolicy legacy
  77. echo 完成
  78. ECHO 卸载OneDrive
  79. taskkill /f /im OneDrive.exe
  80. taskkill /f /im explorer.exe
  81. if exist %SYSTEMROOT%\SysWOW64\OneDriveSetup.exe (
  82. %SYSTEMROOT%\SysWOW64\OneDriveSetup.exe /uninstall
  83. ) else ( //如果不是
  84. %SYSTEMROOT%\System32\OneDriveSetup.exe /uninstall
  85. )
  86. rd /s /q "%USERPROFILE%\OneDrive"
  87. rd /s /q "%LOCALAPPDATA%\Microsoft\OneDrive"
  88. rd /s /q "%PROGRAMDATA%\Microsoft OneDrive"
  89. reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
  90. reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
  91. start explorer
  92. echo 完成
  93. ECHO 登录画面默认开启小键盘
  94. reg add "HKEY_CURRENT_USER\Control Panel\Keyboard" /v InitialKeyboardIndicators /d 80000003 /t REG_SZ /f
  95. reg add "HKEY_USERS\.DEFAULT\Control Panel\Keyboard" /v InitialKeyboardIndicators /d 80000003 /t REG_SZ /f
  96. echo 完成
  97. ECHO 右键添加显示/隐藏系统文件+扩展名
  98. del /f /q "%temp%\_.reg" >nul 2>nul
  99. >>"%temp%\_.reg" echo REGEDIT4
  100. >>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]
  101. >>"%temp%\_.reg" echo @="{00000000-0000-0000-0000-000000000012}"
  102. >>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]
  103. >>"%temp%\_.reg" echo @=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\
  104. >>"%temp%\_.reg" echo 68,64,6f,63,76,77,2e,64,6c,6c,00
  105. >>"%temp%\_.reg" echo "ThreadingModel"="Apartment"
  106. >>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]
  107. >>"%temp%\_.reg" echo "CLSID"="{3f454f0e-42ae-4d7c-8ea3-328250d6e272}"
  108. >>"%temp%\_.reg" echo [HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]
  109. >>"%temp%\_.reg" echo "method"="ShellExecute"
  110. >>"%temp%\_.reg" echo "Param1"="SuperHidden.vbs"
  111. >>"%temp%\_.reg" echo "command"="显示/隐藏系统文件+扩展名"
  112. >>"%temp%\_.reg" echo "CLSID"="{13709620-C279-11CE-A49E-444553540000}"
  113. >>"%temp%\_.reg" echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
  114. >>"%temp%\_.reg" echo "ShowSuperHidden"=dword:00000001
  115. >>"%temp%\_.reg" echo "Hidden"=dword:00000002
  116. regedit /s "%temp%\_.reg" >nul 2>nul
  117. del /f /q "%temp%\_.reg" >nul 2>nul
  118. net config workstation |(find /i "windows 8")&&(goto win8)
  119. net config workstation |(find /i "windows 7")&&(goto win8)
  120. net config workstation |(find /i "windows 2008")&&(goto win8)
  121. net config workstation |(find /i "windows 2012")&&(goto win8)
  122. ::WinXP 2K3
  123. del /f /q "%windir%\SuperHidden.vbs" >nul 2>nul
  124. >>"%windir%\SuperHidden.vbs" echo 'Show/Hide System Files
  125. >>"%windir%\SuperHidden.vbs" echo Dim WSHShell
  126. >>"%windir%\SuperHidden.vbs" echo Set WSHShell = WScript.CreateObject("WScript.Shell")
  127. >>"%windir%\SuperHidden.vbs" echo sTitle1 = "SSH=0"
  128. >>"%windir%\SuperHidden.vbs" echo sTitle2 = "SSH=1"
  129. >>"%windir%\SuperHidden.vbs" echo if WSHShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden") = 1 then
  130. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "0", "REG_DWORD"
  131. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "2", "REG_DWORD"
  132. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "1", "REG_DWORD"
  133. >>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}"
  134. >>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Poof, they're gone!", 1, sTitle1, vbInformation
  135. >>"%windir%\SuperHidden.vbs" echo else
  136. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden", "1", "REG_DWORD"
  137. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden", "1", "REG_DWORD"
  138. >>"%windir%\SuperHidden.vbs" echo WSHShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt", "0", "REG_DWORD"
  139. >>"%windir%\SuperHidden.vbs" echo WSHShell.SendKeys "{F5}+{F10}"
  140. >>"%windir%\SuperHidden.vbs" echo 'WSHShell.Popup "Here they are!", 1, sTitle2, vbInformation
  141. >>"%windir%\SuperHidden.vbs" echo end if
  142. >>"%windir%\SuperHidden.vbs" echo Set WSHShell = Nothing
  143. >>"%windir%\SuperHidden.vbs" echo WScript.Quit(0)
  144. echo 完成

参考

win10 自用的一套优化方案
Win 8.1 Update 优化 辅助批处理 全自动 重装系统必备 一键优化 可恢复

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注