A Good ISO File is a Quiet ISO File

Well, the topic is at least true when automating deployment tests in UEFI-based virtual machines. When spinning up multiple VMs, the last thing you want to do is having the connect to each one of them and "Press any key to boot from CD or DVD….."

When automating builds, say no to this prompt!

Well, that's not to hard to fix, simply replace the usual efisys.bin with a efisys_noprompt.bin from Windows ADK 10. Below you find a script that takes a bootable WinPE ISO file from MDT or ConfigMgr, and converts to a new ISO file that asks no questions.

Tip: When creating empty VMs for this special ISO, make sure to set first boot device to the hard drive so you don't end up in an endless loop 🙂

    Sample script for Deployment Research
    For UEFI Deployments, modifies a WinPE ISO to not ask for "Press Any Key To Boot From..."

    Created: 2020-01-10
    Version: 1.0
    Author : Johan Arwidmark
    Twitter: @jarwidmark
    Blog   : https://deploymentresearch.com
    Disclaimer: This script is provided "AS IS" with no warranties, confers no rights and 
    is not supported by the author or DeploymentArtist..

    Requires Windows ADK 10 to be installed


# Settings
$WinPE_Architecture = "amd64" # Or x86
$WinPE_InputISOfile = "C:\ISO\Zero Touch WinPE 10 x64.iso"
$WinPE_OutputISOfile = "C:\ISO\Zero Touch WinPE 10 x64 - NoPrompt.iso"
$ADK_Path = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit"
$WinPE_ADK_Path = $ADK_Path + "\Windows Preinstallation Environment"
$OSCDIMG_Path = $ADK_Path + "\Deployment Tools" + "\$WinPE_Architecture\Oscdimg"

# Validate locations
If (!(Test-path $WinPE_InputISOfile)){ Write-Warning "WinPE Input ISO file does not exist, aborting...";Break}
If (!(Test-path $ADK_Path)){ Write-Warning "ADK Path does not exist, aborting...";Break}
If (!(Test-path $WinPE_ADK_Path)){ Write-Warning "WinPE ADK Path does not exist, aborting...";Break}
If (!(Test-path $OSCDIMG_Path)){ Write-Warning "OSCDIMG Path does not exist, aborting...";Break}

# Mount the Original ISO (WinPE_InputISOfile) and figure out the drive-letter
Mount-DiskImage -ImagePath $WinPE_InputISOfile
$ISOImage = Get-DiskImage -ImagePath $WinPE_InputISOfile | Get-Volume
$ISODrive = [string]$ISOImage.DriveLetter+":"

# Create a new bootable WinPE ISO file, based on the Original ISO, but using efisys_noprompt.bin instead
$BootData='2#p0,e,b"{0}"#pEF,e,b"{1}"' -f "$OSCDIMG_Path\etfsboot.com","$OSCDIMG_Path\efisys_noprompt.bin"
$Proc = Start-Process -FilePath "$OSCDIMG_Path\oscdimg.exe" -ArgumentList @("-bootdata:$BootData",'-u2','-udfver102',"$ISODrive\","`"$WinPE_OutputISOfile`"") -PassThru -Wait -NoNewWindow
if($Proc.ExitCode -ne 0)
    Throw "Failed to generate ISO with exitcode: $($Proc.ExitCode)"

# Dismount the Original ISO
Dismount-DiskImage -ImagePath $WinPE_InputISOfile

About the author

Johan Arwidmark

0 0 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
1 year ago

nvm….I should've realised it would be Powershell : )

1 year ago

Hi Johan,

Thanks very much for this.

Sorry, but I suck at scripting and don't recognise what kind of file extension I should save this as, .bat, ps1, etc?

Richard Reyes
Richard Reyes
2 years ago

Typo on line #18, it reads: "Requires Windows AK 10 to be installed". Should be: "Requires Windows ADK 10 to be installed". You're still my hero Johan!! Great article!!