Post by zeusabj on Mar 5, 2017 3:44:41 GMT
Hey guys,
I wrote a couple of batch scripts to enable/disable safe mode for your driver installers. Thought I'd share (if interested):
Enable Safe Mode and Reboot:
Disable Safe Mode and Reboot:
I wrote a couple of batch scripts to enable/disable safe mode for your driver installers. Thought I'd share (if interested):
Enable Safe Mode and Reboot:
@ECHO OFF & CLS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
TITLE Enable Safe Mode and Reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Purpose: Reboot the computer with safe mode turned on.
:: Version: 2.0
:: Author: Atlan Brent Johnson
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run Pre-Post Vista check:
IF DEFINED PUBLIC (
REM Display status message:
ECHO.
ECHO Enabling Safe Mode for Windows Vista/2008 or later ...
REM Safe Mode (Minimal):
REM bcdedit /set {default} safeboot minimal
REM Safe Mode with Networking:
bcdedit /set {default} safeboot network
REM Safe Mode with Command Prompt:
REM bcdedit /set {default} safeboot minimal
REM bcdedit /set {default} safebootalternateshell yes
) ELSE (
REM Display status message:
ECHO.
ECHO Enabling Safe Mode for Windows XP/2003 or earlier ...
REM Safe Mode (Minimal):
REM bootcfg /raw /a /safeboot:minimal /sos /bootlog /noguiboot
REM Safe Mode with Networking:
bootcfg /raw /a /safeboot:network /sos /bootlog /noguiboot
REM Safe Mode with Command Prompt:
REM bootcfg /raw /a /safeboot:minimal(alternateshell) /sos /bootlog /noguiboot
)
REM Reboot the computer:
shutdown -r -f -t 07
:EOF
Disable Safe Mode and Reboot:
@ECHO OFF & CLS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
TITLE Disable Safe Mode and Reboot
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Purpose: Reboot the computer with safe mode turned off.
:: Version: 2.0
:: Author: ZeusABJ
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Run Pre-Post Vista check:
IF DEFINED PUBLIC (
REM Display status message:
ECHO.
ECHO Disabling Safe Mode for Windows Vista/2008 or later ...
REM Disable Safe Mode:
bcdedit /deletevalue {default} safeboot
) ELSE (
REM Display status message:
ECHO.
ECHO Disabling Safe Mode for Windows XP/2003 or earlier ...
REM Disable Safe Mode:
bootcfg /raw /fastdetect /id 1
)
REM Reboot the computer:
shutdown -r -f -t 07
:EOF