脚本列表
1、Internet Explorer
- 脚本如下
shell
Const URL_TO_OPEN = "https://www.baidu.com"
Dim objIE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate URL_TO_OPEN
Do While objIE.Busy Or objIE.ReadyState <> 4
WScript.Sleep 100
Loop
Set objIE = Nothing2、删除RDP记录
- 脚本如下
shell
reg delete “HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default” /va /f
reg delete “HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers” /f
reg add “HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers”
del /ah %homepath%\documents\default.rdp3、关闭推荐的项目
- 脚本如下
shell
chcp 936
@echo off
color 3f
mode con cols=80 lines=35
setlocal
:: 检查是否以管理员身份运行
openfiles >nul 2>&1
if %errorlevel% neq 0 (
echo 正在以管理员权限运行...
powershell -Command "Start-Process '%~f0' -Verb runAs"
exit /b
)
:menu
cls
echo.
echo ============================================
echo Win11推荐项目设置器 v1.0
echo ============================================
echo.
echo 1. 关闭“推荐的项目”(隐藏“推荐”区域)
echo.
echo 2. 启用“推荐的项目”(恢复默认显示)
echo.
echo 3. 重启资源管理器(快速应用更改)
echo.
echo 0. 退出
echo.
set /p choice= 请输入选项对应的数字 [0-3],按回车键确认:
if "%choice%"=="1" goto disable
if "%choice%"=="2" goto enable
if "%choice%"=="3" goto restart
if "%choice%"=="0" exit
goto menu
:disable
echo 正在关闭推荐的项目...
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v HideRecommendedSection /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v HideRecommendedSection /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" /v IsEducationEnvironment /t REG_DWORD /d 1 /f
echo 操作完成。
pause
goto menu
:enable
echo 正在启用推荐的项目...
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\Explorer" /v HideRecommendedSection /f
reg delete "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Start" /v HideRecommendedSection /f
reg delete "HKLM\SOFTWARE\Microsoft\PolicyManager\current\device\Education" /v IsEducationEnvironment /f
echo 操作完成。
pause
goto menu
:restart
echo 正在重启资源管理器...
taskkill /f /im explorer.exe >nul 2>&1
timeout /t 1 >nul
start explorer.exe
echo 资源管理器已重启,可重新打开开始菜单,查看设置是否生效。
pause
goto menu4、清理DNS缓存
- 脚本如下
shell
@echo off
ipconfig /all
ipconfig/flushdns
pause5、内核隔离管理工具
- 脚本如下
shell
@echo off
chcp 65001 > nul
title 内核隔离管理工具
:menu
cls
echo ========================================
echo 内核隔离管理工具
echo ========================================
echo.
echo 基于您之前提供的注册表命令:
echo.
echo 1. 关闭内核隔离
echo 2. 启用内核隔离
echo 3. 退出脚本
echo.
echo ========================================
set /p choice=请选择操作 (1/2/3):
if "%choice%"=="1" goto disable_vbs
if "%choice%"=="2" goto enable_vbs
if "%choice%"=="3" goto exit
echo 无效选择,请按任意键重新选择...
pause > nul
goto menu
:disable_vbs
echo.
echo 正在关闭内核隔离...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v EnabledBootId /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v WasEnabledBy /t REG_DWORD /d 1 /f
echo 内核隔离已关闭!
goto restart
:enable_vbs
echo.
echo 正在启用内核隔离...
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard" /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v EnabledBootId /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v WasEnabledBy /t REG_DWORD /d 1 /f
echo 内核隔离已启用!
goto restart
:restart
echo.
echo 操作已完成!计算机将在60秒后重启...
echo 如需取消重启,请按 Ctrl+C 并输入 shutdown /a
echo.
shutdown /r /t 60 /c "内核隔离设置已完成,系统将重启以生效"
pause
goto exit
:exit
echo 脚本执行完毕!
pause6、更改本地账户名称
- 操作如下
text
win + r --> `netplwiz`7、Disable local search bar networking
- 操作如下
shell
reg add HKCU\Software\Policies\Microsoft\Windows\explorer /v DisableSearchBoxSuggestions /t reg_dword /d 1 /f8、Windows11右键样式修改
- 操作如下
shell
# win11右键改为win10:
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
# win10右键改回win11:
reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /va /f