Run Boot media without “Press any key to boot from…” message

If it is a traditional PC BIOS then the ISO uses the El Torito boot code (etfsboot.com). In this case deleting \boot\bootfix.bin will work.

If it is an EFI BIOS then the ISO should use EFI boot code (efisys.bin).
There is also a efisys_noprompt.bin boot code file that can be used when creating the ISO for EFI systems.
Use that file instead if you want to eliminate the prompt.

Microsoft Technet article: https://technet.microsoft.com/en-us/library/dd744321(WS.10).aspx

————————-

Steps:

Download Windows ADK
Install Deployment Tools

Copy original boot media iso to C:\Temp\NoPrompt
Copy oscdimg.exe, efisys_noprompt.bin and etfsboot.com to C:\Temp\NoPrompt

Run powershellscript below to generate noprompt boot media

—————

## variables ##
$sworkspace = “C:\Temp\NoPrompt\extractedISO”

# NEW ISO
$smynewiso=”C:\Temp\NoPrompt\pd_x64_1803.0.noprompt.iso”

# OLD ISO
$stheiso=”C:\Temp\NoPrompt\pd_x64_1803.0.iso”

$setfsboot=”C:\Temp\NoPrompt\etfsboot.com”
$sefisys =”C:\Temp\NoPrompt\efisys_noprompt.bin”
$soscdimg = “C:\Temp\NoPrompt\oscdimg.exe”

## start script ##
# mount the ISO
$mount = mount-diskimage -imagepath $stheiso -passthru

# get the drive letter assigned to the iso.
$drive = ($mount | get-volume).driveletter + ‘:’

# copy the existing iso to the temporary folder.
copy-item $drive $sworkspace -force -recurse

# remove the read-only attribute from the extracted files.
get-childitem $sworkspace -recurse | %{ if (! $_.psiscontainer) { $_.isreadonly = $false } }

# Create a bootable WinPE ISO file (remove the “Press any button key..” message)
Copy-Item -Path $setfsboot -Destination “$sworkspace\boot” –Recurse -Force
Copy-Item -Path $sefisys -Destination “$sworkspace\EFI\Microsoft\Boot” –Recurse -Force

# recompile the files to an ISO
# This is the part from Johan Arwidmark’s WinPE creation script:
$Proc = $null
$Proc = Start-Process -FilePath “$soscdimg” “-o -u2 -udfver102 -bootdata:2#p0,eb$setfsboot#pEF,e,b$sefisys $sworkspace $smynewiso” -PassThru -Wait -NoNewWindow

if($Proc.ExitCode -ne 0)
{
Throw “Failed to generate ISO with exitcode: $($Proc.ExitCode)”
}

# remove the extracted content.
remove-item $sworkspace -recurse -force

# dismount the iso.
Dismount-DiskImage -ImagePath “$stheiso”

—————

https://www.exitcodezero.ch/2017/12/17/boot-image-without-press-any-key-to-boot-from-message/


Posted

in

by

Tags:

Comments

One response to “Run Boot media without “Press any key to boot from…” message”

  1. Gurri Avatar
    Gurri

    I your Earned very well with the help of Trik. Thanku sir

Leave a Reply

Your email address will not be published. Required fields are marked *