Advertisement
maravento

safemode

Jul 19th, 2022
1,743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.70 KB | None | 0 0
  1. @echo off
  2. echo ................................................
  3. echo Press 1, 2, 3 to select your task, or 4 to EXIT.
  4. echo Run this script with admin privileges          .
  5. echo ................................................
  6. echo.
  7. echo 1 - Safe Boot Minimal
  8. echo 2 - Safe Boot with Network
  9. echo 3 - Normal Boot
  10. echo 4 - Exit
  11. echo.
  12. SET /P M=Type 1, 2, 3, 4 then press ENTER:
  13. IF %M%==1 GOTO safe
  14. IF %M%==2 GOTO safenet
  15. IF %M%==3 GOTO normal
  16. IF %M%==4 GOTO exit
  17.  
  18. :safe
  19. bcdedit /set {default} safeboot minimal
  20. goto reboot
  21.  
  22. :safenet
  23. bcdedit /set {default} safeboot network
  24. goto reboot
  25.  
  26. :normal
  27. bcdedit /deletevalue {default} safeboot
  28. goto reboot
  29.  
  30. :reboot
  31. shutdown -r -f -t 4
  32. exit
  33.  
  34. :exit
  35. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement