无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 2605|回复: 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




2#
发表于 2024-12-4 17:44:44 | 只看该作者
谢谢分享,这个是定时关机用的?
回复

使用道具 举报

3#
发表于 2024-12-4 17:54:38 | 只看该作者
有点长,看不懂的;
回复

使用道具 举报

4#
 楼主| 发表于 2024-12-4 17:59:29 | 只看该作者
保存为.bat或者.cmd文件双击运行即可在桌面和鼠标右键中看到

点评

怎样取消鼠标右键呢  详情 回复 发表于 2024-12-4 21:22
回复

使用道具 举报

5#
发表于 2024-12-4 18:08:20 | 只看该作者
谢谢分享
回复

使用道具 举报

6#
发表于 2024-12-4 18:08:31 | 只看该作者
下载试试
回复

使用道具 举报

7#
发表于 2024-12-4 18:10:04 | 只看该作者
很复杂的样子,谢谢大佬分享!
回复

使用道具 举报

8#
发表于 2024-12-4 18:12:30 | 只看该作者
谢谢分享
回复

使用道具 举报

9#
发表于 2024-12-4 18:16:53 | 只看该作者
代码 谢谢分享
回复

使用道具 举报

10#
发表于 2024-12-4 18:21:11 | 只看该作者
谢谢楼主无私分享!
回复

使用道具 举报

11#
发表于 2024-12-4 18:29:25 | 只看该作者
感谢分享
回复

使用道具 举报

12#
发表于 2024-12-4 18:39:55 | 只看该作者
赞一个!
回复

使用道具 举报

13#
发表于 2024-12-4 18:41:31 | 只看该作者
这么复杂?
回复

使用道具 举报

14#
发表于 2024-12-4 18:47:49 | 只看该作者
支持原创 感谢分享
回复

使用道具 举报

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

使用道具 举报

16#
发表于 2024-12-4 19:14:32 | 只看该作者
感谢分享
回复

使用道具 举报

17#
发表于 2024-12-4 19:17:59 | 只看该作者
谢谢分享
回复

使用道具 举报

18#
发表于 2024-12-4 19:32:27 | 只看该作者
好代码,学习下
回复

使用道具 举报

19#
发表于 2024-12-4 19:51:45 | 只看该作者
谢谢分享,
回复

使用道具 举报

20#
发表于 2024-12-4 19:54:51 | 只看该作者
不错
回复

使用道具 举报

21#
发表于 2024-12-4 19:55:33 | 只看该作者
有没有介绍。。。
回复

使用道具 举报

22#
发表于 2024-12-4 20:08:55 | 只看该作者
这么长,一个关机要这么多吗?
回复

使用道具 举报

23#
发表于 2024-12-4 20:10:22 | 只看该作者
好长啊
回复

使用道具 举报

M
24#
发表于 2024-12-4 21:00:24 | 只看该作者
一点就刷刷刷的运行了,不是说有选项的吗?晕死。

点评

可能和我们的系统水土不服  详情 回复 发表于 2024-12-4 21:29
回复

使用道具 举报

25#
发表于 2024-12-4 21:07:02 | 只看该作者
谢谢分享
回复

使用道具 举报

26#
发表于 2024-12-4 21:11:27 | 只看该作者
谢谢分享
回复

使用道具 举报

27#
发表于 2024-12-4 21:19:01 | 只看该作者
这么复杂?
回复

使用道具 举报

28#
发表于 2024-12-4 21:22:05 | 只看该作者
baolizhu 发表于 2024-12-4 17:59
保存为.bat或者.cmd文件双击运行即可在桌面和鼠标右键中看到

怎样取消鼠标右键呢
回复

使用道具 举报

29#
发表于 2024-12-4 21:24:09 | 只看该作者
win 10 pro 测试没用
回复

使用道具 举报

30#
发表于 2024-12-4 21:28:17 | 只看该作者
桌面还 生成一个 电源一样的图标, 删也删不掉, 右键又都是乱码

点评

被你全说了,确实是这样。  详情 回复 发表于 2024-12-5 07:51
回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2025-1-8 23:04

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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