无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2682|回复: 82
打印 上一主题 下一主题

[原创] 分享一个我自己在用的系统关机脚本

  [复制链接]
跳转到指定楼层
1#
发表于 2024-12-4 17:34:37 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式
@Echo Off
Title Reg Converter v1.2 & Color 1A
cd %systemroot%\system32
call :IsAdmin
@pushd "%~dp0"
set cust=%%Windir%%\System32\CustomShutDown.BAT
>%cust%  ECHO @Echo Off
>>%cust%  ECHO setlocal enabledelayedexpansion
>>%cust%  ECHO COLOR 0A
>>%cust%  ECHO MODE CON COLS=45 LINES=20
>>%cust%  ECHO Title 请输入关机时间
>>%cust%  ECHO ECHO.
>>%cust%  ECHO ECHO 包礼瞩温馨提示
>>%cust%  ECHO ECHO.
>>%cust%  ECHO ECHO.
>>%cust%  ECHO ECHO 要取消关机请在菜单中选择。时间不要设得太短
>>%cust%  ECHO ECHO.
>>%cust%  ECHO ECHO 以免来不及取消关机
>>%cust%  ECHO ECHO.
>>%cust%  ECHO ^set /p etime=请输入关机时间,以秒(S)为单位 :
>>%cust%  ECHO ^set /a h2=%%etime%%/3600
>>%cust%  ECHO ^set /a m2=(%%etime%%-%%h2%%*3600)/60
>>%cust%  ECHO ^set /a s2=%%etime%%%%%%60
>>%cust%  ECHO echo.%%h2%%小时 %%m2%%分 %%s2%%秒
>>%cust%  ECHO ^set h1=%%time:~0,2%%
>>%cust%  ECHO ^set m1=%%time:~3,2%%
>>%cust%  ECHO if %%m1:~0,1%%==0 set m1=%%m1:~1%%
>>%cust%  ECHO set s1=%%time:~6,2%%
>>%cust%  ECHO if %%s1:~0,1%%==0 set s1=%%s1:~1%%
>>%cust%  ECHO set ss1=%%time:~9,2%%
>>%cust%  ECHO set /a h=%%h2%%+%%h1%%
>>%cust%  ECHO set /a m=%%m2%%+%%m1%%
>>%cust%  ECHO set /a s=%%s2%%+%%s1%%
>>%cust%  ECHO if %%s%% geq 60 (^set /a s-=60^&^set /a m=m+1)
>>%cust%  ECHO if %%m%% geq 60 (^set /a m-=60^&^set /a h=h+1)
>>%cust%  ECHO if %%h%% geq 24 (^set /a h-=24)
>>%cust%  ECHO ^set "m=0%%m%%"^&^set "m=!m:~-2!"
>>%cust%  ECHO ^set "s=0%%s%%"^&^set "s=!s:~-2!"
>>%cust%  ECHO echo.当前系统时间%%time%%
>>%cust%  ECHO echo 累加后的时间%%h%%:%%m%%:%%s%%.%%ss1%%
>>%cust%  ECHO echo.你输入的时间是%TIME1%秒按任意键执行关机操作 ^&^&pause^>nul
>>%cust%  ECHO ^SET GHJ=%%h%%:%%m%%:%%s%%.%%ss1%%
>>%cust%  ECHO %%Windir%%\System32\Shutdown.exe /F /S /T %%etime%% /C "您的电脑将在%%ghj%%时间内关闭,请做好文档保存工作以及退出比较大型的软件如3DMARKS之类的。"
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /v "MuiVerb" /t REG_EXPAND_SZ /d "关闭计算机" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /v "INFOTIP" /t REG_EXPAND_SZ /d "关机快捷方式(包括关机、倒计时关机、重新启动电脑、休眠、锁定、注销等)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /v "TileInfo" /t REG_EXPAND_SZ /d "prop:System.ItemAuthors" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /v "System.ItemAuthors" /t REG_EXPAND_SZ /d "只为关机更方便" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /v "System.ControlPanel.Category" /t REG_EXPAND_SZ /d "2,4" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\DefaultIcon" /ve /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INPROCSERVER32" /ve /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHDOCVW.DLL" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INPROCSERVER32" /v "THREADINGMODEL" /t REG_EXPAND_SZ /d "APARTMENT" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INSTANCE" /v "CLSID" /t REG_EXPAND_SZ /d "{3F454F0E-42AE-4D7C-8EA3-328250D6E272}" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INSTANCE\INITPROPERTYBAG" /v "METHOD" /t REG_EXPAND_SZ /d "SHELLEXECUTE" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INSTANCE\INITPROPERTYBAG" /v "PARAM1" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INSTANCE\INITPROPERTYBAG" /v "COMMAND" /t REG_EXPAND_SZ /d "" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\INSTANCE\INITPROPERTYBAG" /v "CLSID" /t REG_EXPAND_SZ /d "{13709620-C279-11CE-A49E-444553540000}" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell" /ve /t REG_EXPAND_SZ /d "SHUTDOWN" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "CanonicalName" /t REG_SZ /d "{edf99fce-5d83-441a-a6c6-d363532ede4f}" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "MUIVerb" /t REG_SZ /d "调用Windows系统关机对话框(&U)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "Description" /t REG_SZ /d "@shell32.dll,-31451\"" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "CommandStateSync" /t REG_SZ /d "" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow" /v "CommandFlags" /t reg_dword /d "50" /F
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\aClosewindow\command" /v "DelegateExecute" /t REG_SZ /d "{8570b44e-d109-42d3-be32-0f8d446669c5}" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\acmg" /v "MuiVerb" /t REG_SZ /d "电源管理" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\acmg" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\acmg" /v "CommandFlags" /t reg_dword /d "50" /F
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\acmg\Command" /ve /t REG_EXPAND_SZ /d "\"%SystemRoot%\System32\control.exe\" \"powercfg.cpl"\" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CANCELSHUTDOWN" /v "MuiVerb" /t REG_EXPAND_SZ /d "取消关机(&C)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CANCELSHUTDOWN" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,131" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CANCELSHUTDOWN\COMMAND" /ve /t REG_EXPAND_SZ /d "shutdown /a" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CUSTOMSHUTDOWN" /v "MuiVerb" /t REG_EXPAND_SZ /d "自定义关机时间(&M)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CUSTOMSHUTDOWN" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,-25" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\CUSTOMSHUTDOWN\Command" /ve /t REG_EXPAND_SZ /d "%cust%" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HALFHOUR" /v "MuiVerb" /t REG_EXPAND_SZ /d "倒计时30分关机(&H)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HALFHOUR" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\imageres.DLL,-86" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HALFHOUR\COMMAND" /ve /t REG_EXPAND_SZ /d "SHUTDOWN /F /S /T 1800 /C 半小时后关机" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HIBERNATION" /v "MuiVerb" /t REG_EXPAND_SZ /d "休眠(&P)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HIBERNATION" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,34" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\HIBERNATION\COMMAND" /ve /t REG_EXPAND_SZ /d "rundll32.exe powrprof.dll,SetSuspendState Hibernate" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\LOCKED" /v "MuiVerb" /t REG_EXPAND_SZ /d "锁定(&O)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\LOCKED" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,47" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\LOCKED\COMMAND" /ve /t REG_EXPAND_SZ /d "RUNDLL32.EXE USER32.DLL,LockWorkStation" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\led" /v "MuiVerb" /t REG_EXPAND_SZ /d "关闭显示器" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\led" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\Shell32.DLL,47" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\led\Command" /v "DelegateExecute" /t REG_SZ /d "{nodelegate}" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\led\Command" /ve /t REG_SZ /d "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Network Shortcuts" /v "MuiVerb" /t REG_SZ /d "网络设备(&S)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Network Shortcuts" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Network Shortcuts\command" /ve /t REG_EXPAND_SZ /d "C:\Windows\explorer.exe %%appdata%%\Microsoft\Windows\Network Shortcuts" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Next hybrid" /v "Icon" /t REG_EXPAND_SZ /d "cmd.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Next hybrid" /v "Muiverb" /t REG_EXPAND_SZ /d "关机在下一次使用快速启动" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Next hybrid\Command" /ve /t REG_SZ /d "shutdown /hybrid /f /s /t 0" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\REBOOT" /v "MuiVerb" /t REG_EXPAND_SZ /d "重新启动(&R)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\REBOOT" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\powrprof.dll,-513" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\REBOOT\COMMAND" /ve /t REG_EXPAND_SZ /d "SHUTDOWN /R /F /T 0 /C 重启电脑" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite" /v "MuiVerb" /t REG_EXPAND_SZ /d "修改当前登录用户的密码为admin" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite" /v "Icon" /t REG_EXPAND_SZ /d "cmd.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite\command" /ve /t REG_EXPAND_SZ /d "cmd /k %%windir%%\system32\passrewrite.bat" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\SHUTDOWN" /v "MuiVerb" /t REG_EXPAND_SZ /d "关机(&U)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\SHUTDOWN" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\SHUTDOWN\COMMAND" /ve /t REG_EXPAND_SZ /d "shutdown /f /p\"" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\TENMIAO" /v "MuiVerb" /t REG_EXPAND_SZ /d "倒计时10秒关机(&A)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\TENMIAO" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\powercpl.dll,-513" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\TENMIAO\COMMAND" /ve /t REG_EXPAND_SZ /d "SHUTDOWN /F /S /T 10 /C 10秒后关机" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Tsdiscon" /v "MuiVerb" /t REG_SZ /d "切换用户(&S)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Tsdiscon" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\Tsdiscon\command" /ve /t REG_SZ /d "C:\Windows\System32\tsdiscon.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ViewMyPCMenue" /ve /t REG_SZ /d "注册表中修改关机菜单(&E)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ViewMyPCMenue" /v "Icon" /t REG_EXPAND_SZ /d "regedit.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ViewMyPCMenue\Command" /ve /t REG_SZ /d "cmd /c REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit" /v "LastKey" /t REG_SZ /d "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell" /f>nul&taskkill /F /IM cmd.exe|regedit.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ZHUXIAO" /v "MuiVerb" /t REG_EXPAND_SZ /d "注销(&L)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ZHUXIAO" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,-331" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\ZHUXIAO\COMMAND" /ve /t REG_EXPAND_SZ /d "SHUTDOWN.EXE -L " /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\zhuoyue" /v "Muiverb" /t REG_EXPAND_SZ /d "开启卓越性能模式" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\zhuoyue" /v "Icon" /t REG_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\zhuoyue\Command" /ve /t REG_SZ /d "cmd /c powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61&pause" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\netplwiz" /ve /t REG_SZ /d "系统自动登录设置(&L)" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\netplwiz" /v "Icon" /t REG_EXPAND_SZ /d "netplwiz.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\netplwiz\Command" /ve /t REG_EXPAND_SZ /d "cmd /c REG ADD \"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device\" /V \"DevicePasswordLessBuildVersion\" /t reg_dword /d \"0\" /f>nul&taskkill /F /IM cmd.exe|netplwiz.exe\"" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\BIOS" /v "MuiVerb" /t REG_EXPAND_SZ /d "重启到BIOS" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\BIOS" /v "Icon" /t REG_SZ /d "cmd.exe" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\BIOS\Command" /ve /t REG_SZ /d "C:\Windows\System32\shutdown.exe -f  -fw -r -t 0" /f
Reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\recovery" /v "MuiVerb" /t REG_EXPAND_SZ /d "重启到恢复模式" /f
Reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\recovery" /v "Icon" /t REG_SZ /d "cmd.exe" /f
Reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\recovery" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\recovery\Command" /ve /t REG_SZ /d "C:\Windows\System32\shutdown.exe -f  -o -r -t 0" /f
REG ADD "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\SHELLFOLDER" /v "ATTRIBUTES" /t REG_BINARY /d "00000010" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000021}" /ve /t REG_SZ /d "PowerControl" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{00000000-0000-0000-0000-000000000021}" /ve /t REG_SZ /d "PowerControl" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{00000000-0000-0000-0000-000000000021}" /ve /t REG_SZ /d "PowerControl" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\acmg" /v "MuiVerb" /t REG_SZ /d "电源管理" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\acmg" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\acmg" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\acmg\Command" /ve /t REG_EXPAND_SZ /d "\"%%SystemRoot%%\System32\control.exe\" \"powercfg.cpl\"" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\BIOS" /v "MuiVerb" /t REG_EXPAND_SZ /d "重启到BIOS" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\BIOS" /v "Icon" /t REG_SZ /d "cmd.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\BIOS" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\BIOS\Command" /ve /t REG_SZ /d "C:\Windows\System32\shutdown.exe -f  -fw -r -t 0" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\recovery" /v "MuiVerb" /t REG_EXPAND_SZ /d "重启到恢复模式" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\recovery" /v "Icon" /t REG_SZ /d "cmd.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\recovery" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\recovery\Command" /ve /t REG_SZ /d "C:\Windows\System32\shutdown.exe -f  -o -r -t 0" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow" /v "CanonicalName" /t REG_SZ /d "{edf99fce-5d83-441a-a6c6-d363532ede4f}" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow" /v "MUIVerb" /t REG_SZ /d "调用Windows系统关机对话框(&U)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow" /v "Icon" /t REG_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow" /v "Description" /t REG_SZ /d "@shell32.dll,-31451" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow" /v "CommandStateSync" /t REG_SZ /d "" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Closewindow\command" /v "DelegateExecute" /t REG_SZ /d "{8570b44e-d109-42d3-be32-0f8d446669c5}" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN" /v "MuiVerb" /t REG_EXPAND_SZ /d "自定义关机时间(&M)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,-25" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN\Command" /ve /t REG_EXPAND_SZ /d "%%Windir%%\System32\ShutDown.BAT" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\expert" /v "MuiVerb" /t REG_SZ /d "右键菜单导出(&E)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\expert" /v "Icon" /t REG_SZ /d "cmd.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\expert" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\expert\Command" /ve /t REG_SZ /d "cmd /c reg export \"HKEY_CLASSES_ROOT\Directory\Background\shell\Powercontrol\shell\" 右键关机菜单.reg /y® export \"HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000021}\" 桌面关机菜单.reg /y" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\hibernate" /v "MuiVerb" /t REG_SZ /d "休眠(&H)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\hibernate" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,34" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\hibernate" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\hibernate\command" /ve /t REG_SZ /d "rundll32.exe powrprof.dll,SetSuspendState Hibernate" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\led" /v "MuiVerb" /t REG_EXPAND_SZ /d "关闭显示器" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\led" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\Shell32.DLL,47" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\led" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\led\Command" /v "DelegateExecute" /t REG_SZ /d "{nodelegate}" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\led\Command" /ve /t REG_SZ /d "rundll32.exe powrprof.dll,SetSuspendState 0,1,0" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\lock" /v "MuiVerb" /t REG_SZ /d "锁定(&N)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\lock" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\Shell32.DLL,47" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\lock" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\lock\command" /ve /t REG_SZ /d "Rundll32 User32.dll,LockWorkStation" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\logoff" /v "MuiVerb" /t REG_SZ /d "注销(&L)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\logoff" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,-331" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\logoff" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\logoff\command" /ve /t REG_SZ /d "Shutdown -f -l" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\netplwiz" /ve /t REG_SZ /d "系统自动登录设置(&L)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\netplwiz" /v "Icon" /t REG_EXPAND_SZ /d "netplwiz.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\netplwiz" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\netplwiz\Command" /ve /t REG_EXPAND_SZ /d "cmd /c REG ADD \"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device\" /V \"DevicePasswordLessBuildVersion\" /t reg_dword /d \"0\" /f>nul&taskkill /F /IM cmd.exe|netplwiz.exe\"" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Network Shortcuts" /v "MuiVerb" /t REG_SZ /d "网络设备(&S)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Network Shortcuts" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Network Shortcuts" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\Network Shortcuts\command" /ve /t REG_EXPAND_SZ /d "C:\Windows\explorer.exe %%appdata%%\Microsoft\Windows\Network Shortcuts" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\restart" /v "MuiVerb" /t REG_SZ /d "重启(&R)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\restart" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\powrprof.dll,-513" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\restart" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\restart\command" /ve /t REG_SZ /d "Shutdown -r -t 0" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\shutdown" /v "MuiVerb" /t REG_SZ /d "关机(&U)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\shutdown" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\shutdown" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\shutdown\command" /ve /t REG_SZ /d "Shutdown -f -s -t 00" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\sleep" /v "MuiVerb" /t REG_SZ /d "睡眠(&A)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\sleep" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,34" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\sleep" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\sleep\command" /ve /t REG_SZ /d "rundll32.exe powrprof.dll,SetSuspendState Sleep" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\slidetoshutdown" /v "MuiVerb" /t REG_SZ /d "滑动关机(&S)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\slidetoshutdown" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\slidetoshutdown" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\slidetoshutdown\command" /ve /t REG_SZ /d "C:\Windows\System32\slidetoshutdown.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\tsdiscon" /v "MuiVerb" /t REG_SZ /d "切换用户(&S)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\tsdiscon" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,170" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\tsdiscon" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\tsdiscon\command" /ve /t REG_SZ /d "C:\Windows\System32\tsdiscon.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\ViewMyPCMenue" /ve /t REG_SZ /d "注册表中修改关机菜单(&E)" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\ViewMyPCMenue" /v "Icon" /t REG_EXPAND_SZ /d "regedit.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\ViewMyPCMenue" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\ViewMyPCMenue\Command" /ve /t REG_SZ /d "cmd /c REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Applets\Regedit /v LastKey /t REG_SZ /d HKCR\Directory\Background\shell\Powercontrol\shell /f>nul&taskkill /F /IM cmd.exe|regedit.exe" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\zhuoyue" /v "Muiverb" /t REG_EXPAND_SZ /d "开启卓越性能模式" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\zhuoyue" /v "Icon" /t REG_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,27" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\zhuoyue" /v "CommandFlags" /t REG_DWORD /d "50" /f
Reg add "HKCR\Directory\Background\shell\Powercontrol\shell\zhuoyue\Command" /ve /t REG_SZ /d "cmd /c powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61&pause" /f
REG ADD "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN" /v "MuiVerb" /t REG_EXPAND_SZ /d "自定义关机时间(&M)" /f
REG ADD "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN" /v "Icon" /t REG_EXPAND_SZ /d "%%WINDIR%%\SYSTEM32\SHELL32.DLL,-25" /f
REG ADD "HKCR\Directory\Background\shell\Powercontrol\shell\CUSTOMSHUTDOWN\Command" /ve /t REG_EXPAND_SZ /d "%cust%" /f
echo @echo off >%windir%\system32\passrewrite.bat
echo color 0a>>%windir%\system32\passrewrite.bat
echo title 用户%username%密码修改>>%windir%\system32\passrewrite.bat
echo net user %username% admin>>%windir%\system32\passrewrite.bat
echo echo 当前系统%username%用户的登录密码成功修改为admin>>%windir%\system32\passrewrite.bat
echo echo.>>%windir%\system32\passrewrite.bat
echo pause>>%windir%\system32\passrewrite.bat
reg add HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite /v "MuiVerb" /t reg_expand_sz /d "修改当前登录用户的密码为admin" /f
reg add HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite /v "Icon" /t reg_expand_sz /d "cmd.exe" /f
reg add HKCR\CLSID\{00000000-0000-0000-0000-000000000021}\shell\rewrite\command /ve /t reg_expand_sz /d "cmd /k %%windir%%\system32\passrewrite.bat" /f
Exit
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ...
Pause & Exit
)
Cls
goto:eof




76#
发表于 2024-12-7 19:49:18 | 只看该作者
谢谢分享
回复

使用道具 举报

75#
发表于 2024-12-7 18:17:06 | 只看该作者
好复杂啊,,,何必呢
回复

使用道具 举报

74#
 楼主| 发表于 2024-12-7 17:56:01 | 只看该作者
保存为ansi编码即可
回复

使用道具 举报

73#
发表于 2024-12-6 10:18:55 | 只看该作者
这也太复杂了
回复

使用道具 举报

72#
发表于 2024-12-6 09:55:22 | 只看该作者
谢谢楼主分享!
回复

使用道具 举报

M
71#
发表于 2024-12-6 09:37:20 | 只看该作者
ailixiaoran 发表于 2024-12-5 21:06
看来是怕了  哈哈哈

哈哈,不怕不行啊。
回复

使用道具 举报

70#
发表于 2024-12-6 03:02:46 | 只看该作者
感谢分享!!
回复

使用道具 举报

69#
发表于 2024-12-6 02:24:07 | 只看该作者
还好没有轻易尝试
回复

使用道具 举报

68#
发表于 2024-12-5 23:04:16 | 只看该作者
谢谢分享
PE系统可以使用,有部分功能无效
回复

使用道具 举报

67#
发表于 2024-12-5 21:06:59 | 只看该作者
M 发表于 2024-12-5 14:41
大佬这个bat是要ansi格式还是utf格式呀?

  看来是怕了  哈哈哈

点评

M
哈哈,不怕不行啊。  详情 回复 发表于 2024-12-6 09:37
回复

使用道具 举报

66#
发表于 2024-12-5 17:00:40 | 只看该作者
学习
回复

使用道具 举报

65#
发表于 2024-12-5 16:46:02 | 只看该作者
呃,本来一个shutdown命令,这批处理看得头晕。
回复

使用道具 举报

64#
发表于 2024-12-5 15:09:00 | 只看该作者
保存为.bat或者.cmd文件双击运行即可在桌面和鼠标右键中看到
回复

使用道具 举报

63#
发表于 2024-12-5 15:04:28 | 只看该作者
感谢分享
回复

使用道具 举报

62#
发表于 2024-12-5 14:58:27 | 只看该作者
好家伙这么强悍的小工具、感谢分享了哈
回复

使用道具 举报

61#
发表于 2024-12-5 14:51:47 | 只看该作者
安装完都是乱码
回复

使用道具 举报

M
60#
发表于 2024-12-5 14:41:51 | 只看该作者
baolizhu 发表于 2024-12-5 11:38
卸载代码
以下内容保存为.bat或.cmd文件:
rem 删除桌面上的图标

大佬这个bat是要ansi格式还是utf格式呀?

点评

看来是怕了 哈哈哈  详情 回复 发表于 2024-12-5 21:06
回复

使用道具 举报

M
59#
发表于 2024-12-5 14:29:18 | 只看该作者
ailixiaoran 发表于 2024-12-4 21:29
可能和我们的系统水土不服

是不是精简版的被丑拒了呀。
回复

使用道具 举报

58#
发表于 2024-12-5 14:07:09 | 只看该作者
不错,感谢大佬开源分享
回复

使用道具 举报

57#
发表于 2024-12-5 13:50:13 来自手机 | 只看该作者
谢谢分享
回复

使用道具 举报

56#
发表于 2024-12-5 11:51:48 | 只看该作者
感谢分享,
回复

使用道具 举报

55#
 楼主| 发表于 2024-12-5 11:38:59 | 只看该作者
卸载代码
以下内容保存为.bat或.cmd文件:
rem 删除桌面上的图标
REG delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000021}" /f
rem 删除控制面板中的图标
REG delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{00000000-0000-0000-0000-000000000021}" /f
rem 删除资源管理器中的图标
REG delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{00000000-0000-0000-0000-000000000021}" /f
rem 删除右键中的图标
REG delete  "HKCR\Directory\Background\shell\Powercontrol\shell" /f
rem 删除HKCR\CLSID下的残留
REG delete "HKCR\CLSID\{00000000-0000-0000-0000-000000000021}" /f
以下内容保存为.reg文件:
Windows Registry Editor Version 5.00
;删除HKEY_CLASSES_ROOT\CLSID下的残留
[-HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000021}]
;删除桌面上的图标
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000021}]
;删除控制面板中的图标
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{00000000-0000-0000-0000-000000000021}]
;删除资源管理器中的图标
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{00000000-0000-0000-0000-000000000021}]

点评

M
大佬这个bat是要ansi格式还是utf格式呀?  详情 回复 发表于 2024-12-5 14:41
回复

使用道具 举报

54#
发表于 2024-12-5 10:39:49 | 只看该作者
回复

使用道具 举报

53#
发表于 2024-12-5 10:39:32 | 只看该作者
谢谢楼主分享
回复

使用道具 举报

52#
发表于 2024-12-5 10:33:34 | 只看该作者
什么鬼,乱码还删不掉
回复

使用道具 举报

51#
发表于 2024-12-5 10:08:37 | 只看该作者
感谢楼主无私奉献,收藏备用
回复

使用道具 举报

50#
发表于 2024-12-5 10:07:34 | 只看该作者
谢谢大佬分享!
回复

使用道具 举报

49#
发表于 2024-12-5 10:06:32 | 只看该作者
请大家不要尝试,桌面和盘符位置会生成电源一样的图标, 删不掉, 右键都是乱码
回复

使用道具 举报

48#
发表于 2024-12-5 10:06:16 | 只看该作者
谢谢楼主分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2025-1-10 02:16

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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