找回密码
 立即注册

批处理重启命令

[复制链接]
69伙伴 发表于 2024-1-30 11:32:59 | 显示全部楼层 |阅读模式
今天用远程桌面需要关机。
还是贴个脚本更方便


  1. @echo OFF

  2. :input
  3. title Shut down
  4. set /p "num=1:Restart  2:Shut down  3:quit  :"
  5. if "%num%"=="1" cls & goto 1
  6. if "%num%"=="2" cls & goto 2
  7. if "%num%"=="3" cls & goto 3
  8. echo. & echo There is no such option & pause>nul & cls & goto input
  9. :1
  10. echo Restart.
  11. echo =============================
  12. echo ====== Run command ==========
  13. shutdown /r /t 0
  14. echo ==============================
  15. pause>nul
  16. cls & goto input
  17. :2
  18. echo Shut down
  19. echo ===echo =============================
  20. echo ====== Run command ==========
  21. shutdown -p
  22. echo ==============================
  23. pause>nul
  24. cls & goto input

  25. :3
  26. echo -Quit.
  27. echo ===echo =============================
  28. echo ====== Run command ==========
  29. echo ==============================
  30. EXIT
  31. cls & goto input
复制代码






shutdown -p  #立即关机
shutdown -s -t 200  #200秒后关机
shutdown -l  #注销
shutdown -r  #重启电脑
shutdown -h  #睡眠
shutdown -a  #取消关机任务


windows 重启网卡命令

  1. @echo off
  2. netsh interface set interface "本地" disabled
  3. timeout /t 5 >nul
  4. netsh interface set interface "本地" enabled
复制代码


临时交流 ⇨点我留言
【附件·直下】非必要·勿注册

网格·联系我们 ( 京ICP备16001788号|京公网安备 11010502049360号 ) | 网站地图 | 2012- WGPro.CoM |

GMT+8, 2024-11-23 16:07

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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