| @echo off & setlocal enabledelayedexpansion |
| echo 代码开始 |
| |
| COLOR 04 |
| COLOR 84 |
| |
| COLOR f4 |
| COLOR fc |
| COLOR 7c |
| COLOR 74 |
| echo. |
| echo. |
| echo --------------系统版本如下: |
| |
| ver | find "5.1" > nul && set TheOS=Windows XP && goto wxp |
| ver | find "6.1" > nul && set TheOS=Windows 7 && goto wn7 |
| ver | find "10.0.1"> nul && set TheOS=Windows 10 && goto w10 |
| ver | find "10.0.2"> nul && set TheOS=Windows 11 && goto w11 |
| |
| |
| ================================================= |
| :wxp |
| echo wxp |
| |
| pause >nul |
| exit |
| |
| ================================================= |
| :wn7 |
| echo wn7 |
| pause >nul |
| |
| if /i "%PROCESSOR_ARCHITECTURE%" equ "amd64" ( |
| set OsProcessor="X64位" && goto :wn7x64 |
| ) else ( |
| if /i "PROCESSOR_ARCHITECTURE" equ "x86" ( |
| set OsProcessor="X86位" && goto :wn7x86 |
| ) else ( |
| set OsProcessor="未知" && exit |
| ) |
| ) |
| |
| if %OsProcessor%=="X64位" goto :wn7x64 |
| if %OsProcessor%=="X86位" goto :wn7x86 |
| if %OsProcessor%=="未知" exit |
| |
| ====================== |
| :wn7x64 |
| echo wn7x64 |
| |
| pause >nul |
| exit |
| |
| ====================== |
| :wn7x86 |
| echo wn7x86 |
| |
| pause >nul |
| exit |
| |
| |
| ================================================= |
| :w10 |
| echo w10 |
| set winx=w10 |
| goto :stat |
| |
| pause >nul |
| exit |
| |
| ================================================= |
| :w11 |
| echo w11 |
| set winx=w11 |
| goto :stat |
| |
| |
| pause >nul |
| exit |
| |
| |
| ================================================= |
| ================================================= |
| :stat |
| @echo off & setlocal enabledelayedexpansion |
| echo 代码开始 |
| |
| set "tsb=%USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar" |
| |
| echo %winx% |
| 1pause >nul |
| cls |
| |
| start "" "%tsb%" |
| pause >nul |
| cls |
| |
| del /q "%tsb%\*.*" |
| |
| copy /y 此电脑.exe C:\Windows |
| copy /y "%winx%\*.*" "%tsb%" |
| 1pause >nul |
| cls |
| |
| regedit /s %winx%.reg |
| 1pause >nul |
| cls |
| |
| shutdown -l -f |
| |
| exit |
| |
| |
| |
| echo 目录 |
| %USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar |
| |
| |
| REM 任务栏锁定的程序信息都保存在以下注册表位置 |
| echo 注册表 |
| HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TaskbandCOPY |