
@echo off
color 80
 cls
 :start
 echo.
ECHO -------------------------------------------------------------------------------
echo.				 Enter Safe Mode Script
echo.   	(You need to be An Administrator to run these commands.)
echo.				 Created by Sundavor.
ECHO -------------------------------------------------------------------------------
 echo 1. Safe Mode.
 echo 2. Safe Mode with Networking.
 echo 3. Safe Mode with CMD.
 echo 4. If loopback occurs and you Return to safe mode use this option.
 echo 5. I'm done.
 echo.
 echo.
 set /p x=Pick:
 IF '%x%' == '%x%' GOTO Item_%x%

:Item_1
 bcdedit /set {default} safeboot minimal
REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v *normalboot /t Reg_SZ /d "bcdedit /deletevalue {default} safeboot"
echo please wait.
 GOTO Item_6

:Item_2
 bcdedit /set {default} safeboot network
REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v *normalboot /t Reg_SZ /d "bcdedit /deletevalue {default} safeboot"
echo please wait.
 GOTO Item_6

:Item_3
 bcdedit /set {default} safeboot minimal
 bcdedit /set {default} safebootalternateshell yes
REG ADD "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v *normalboot /t Reg_SZ /d "bcdedit /deletevalue {default} safeboot"
echo please wait.
 GOTO Item_6

:Item_4
 bcdedit /deletevalue {default} safeboot
echo please wait
 GOTO Item_6

:Item_5
exit

:Item_6
cls
ECHO -------------------------------------------------------------------------------
echo.                Would you like to resart or go to Main Menu?.
ECHO -------------------------------------------------------------------------------
 echo 1. Restart.
 echo 2. Go to Main Menu.
set /p x=Pick:
 IF '%x%' == '%x%' GOTO next_%x%

:next_1
shutdown -r -t 01
exit

:next_2
cls
GOTO Start
