7

Windows PE を含むフラッシュ ドライブ メディアでコンピューターを再起動しようとしていますが、毎回自動修復の準備中しか起動しません。新しいbcdエントリを生成する私のpowershellは次のとおりです。

$drive = (get-location).Drive.Name + ":"

$output = bcdedit /copy '{current}' /d "automaticabd"

$variable = "{" + $output.Split('{')[-1]
$variable = $variable.TrimEnd('.')

"Attaching $variable to device partition $drive"
bcdedit /set $variable device partition=$drive
""
"Attaching $variable to osdevice partition $drive"
bcdedit /set $variable osdevice partition=$drive
""
"Setting $variable path to EFI: \EFI\Boot\bootx64.efi"
bcdedit /set $variable path \EFI\Boot\bootx64.efi

""
"Other settings..."
bcdedit /set $variable systemroot \windows
bcdedit /set $variable winpe yes
bcdedit /set $variable  recoveryenabled No

bcdedit /bootsequence $variable

すべての操作が正常に完了し、私の知る限りエントリが正しいように見えます。

ここに画像の説明を入力

しかし、コンピューターを再起動すると、「自動回復を修復しています」というメッセージが表示され、最終的に Windows 回復環境に入ります。その後、 を追加bcdedit /set $variable recoveryenabled Noしたため、回復環境に入ることができなくなりましたが、別のエラーが発生しました。

必要なファイルが見つからないか、エラーが含まれているため、アプリケーションまたはオペレーティング システムを読み込めませんでした。

ファイル: \EFI\Boot\bootx64.efi エラー コード: 0xc000007b

しかし、起動オプションに移動してこのファイルを手動で選択すると、winpe で問題なく起動します。

何が問題なのかよくわかりません。どんな助けでも大歓迎です。

フラッシュ ドライブで Windows PE を正常に起動できるようにコードを修正するにはどうすればよいですか?

4

1 に答える 1