Skip to content

Instantly share code, notes, and snippets.

@wangjiezhe
Created November 21, 2024 11:04
Show Gist options
  • Select an option

  • Save wangjiezhe/b69bd0682e80e9ca61ee58690cbc85f8 to your computer and use it in GitHub Desktop.

Select an option

Save wangjiezhe/b69bd0682e80e9ca61ee58690cbc85f8 to your computer and use it in GitHub Desktop.

Revisions

  1. wangjiezhe created this gist Nov 21, 2024.
    22 changes: 22 additions & 0 deletions tool.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    @echo off

    REM ===========================================

    mountvol X: /s
    rem copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y
    rem 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

    echo.
    echo.
    echo.
    echo.
    echo =======================================================
    echo 当前操作已完成,接下来请关闭此窗口并重启电脑,然后根据屏幕提示完成剩下操作。
    pause > nul
    echo.
    echo.