文档内容如下: @echo off set flag=0 set input=Windows7_OS for %%i in (c d e f g h i j k l m n o p q r s t u v w x y z) do ( for /f tokens=4 %%j in ('vol %%i: 2^nul') do if /i %%j==%input% call :success %%i&set flag=1 ) :success %1: cd windows\system32 bcdedit /set {bootmgr} device partition=%1: bcdedit /set {default} device partition=%1: bcdedit /set {default} osdevice partition=%1: bcdedit /v exit