Created
July 17, 2019 18:53
-
-
Save stgnet/ca49a273a01ca2c99cd3c3a4311276f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
net session >nul 2>&1 | |
if %errorLevel% == 0 ( | |
@echo on | |
mountvol X: /s | |
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y | |
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi" | |
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215} | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS | |
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X: | |
mountvol X: /d | |
bcdedit /set hypervisorlaunchtype off | |
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All | |
SHUTDOWN -r -t 5 | |
) else ( | |
echo Please run as administrator | |
pause | |
exit /b | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment