We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8beab9a commit 4a41923Copy full SHA for 4a41923
WinImageBuilder.psm1
@@ -282,12 +282,16 @@ function Create-BCDBootConfig {
282
}
283
} else {
284
$bcdbootOutput = & $bcdbootPath ${windowsDrive}\windows /s ${systemDrive} /v /f $diskLayout
285
+ # Retry using the local bcdboot path
286
+ if ($LASTEXITCODE) {
287
+ Write-Log "Retrying with bcdboot.exe from host"
288
+ $bcdbootOutput = & $bcdbootLocalPath ${windowsDrive}\windows /s ${systemDrive} /v /f $diskLayout
289
+ }
290
291
if ($LASTEXITCODE) {
292
$ErrorActionPreference = "Stop"
293
throw "BCDBoot failed with error: $bcdbootOutput"
294
-
295
Reset-BCDSearchOrder -systemDrive $systemDrive -windowsDrive $windowsDrive `
296
-diskLayout $diskLayout
297
0 commit comments