Sets up the "plain" WinPE skeleton files on Windows Worker at C:\WinPE_amd64.
This folder can be copied and then it's .\media\sources\boot.wim file can be modified for an automated unattended Windows install.
This folder works for both BIOS and UEFI boot methods.
Automate This
Use the Attune GUI for your Scripts
You've automated: WinPE Essentials Extraction on Windows
Get the most out of automation with our get started videos, product demonstrations, and more.
The following steps will guide you through the manual process.
Deploys the Win2019 DVD ISO to the C:\attuneautomationworker\build-winpe-iso directory on Windows Worker.
Connect via RDP:
mstsc /admin /v:{automationworkerwindowsnode}
Login as user {automationworkerwindowsuseradministrator} and open a command prompt.
Download from https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019.
Copy the File(s) Win201_ISO.tar to the target node.
Deploy the File(s) here:
{automationWorkerWindowsBaseDirectorySharePath}/build-winpe-iso, relative to the home directory
Extracts the Windows Server ISO using 7z.exe to C:\attuneautomationworker\build-winpe-iso\winimg.
winimg stands for Windows Image.
Execute the following script:
$ISO_BUILD="{automationWorkerWindowsBaseDirectory}"
$BUILD_DIR="${ISO_BUILD}\build-winpe-iso"
Set-Location $BUILD_DIR
$ISO_WILDCARD="*.iso"
$FOLDER="winimg"
if (test-Path "${ISO_WILDCARD}" -pathtype leaf) {
$ISO=(dir $ISO_WILDCARD).name
Write-Host "Found ISO ${ISO}. Extracting it."
& 'C:\Program Files\7-Zip\7z.exe' x ".\${ISO}" -o"${FOLDER}"
Write-Host "Removing ${ISO}"
Remove-Item "${ISO}"
} else {
Write-Error "No ISO found for extracting."
}
Deletes Skeleton C:\WinPE_amd64 folder on Windows Worker.
Execute the following script:
$WinPE_amd64="{automationWorkerWindowsBaseDirectory}\WinPE_amd64"
Write-Host "Checking if the path $WinPE_amd64 exists..."
if (Test-Path "${WinPE_amd64}") {
Write-Host "Path found. Removing the directory $WinPE_amd64 and its contents..."
Remove-Item -Path "${WinPE_amd64}" -Recurse
Write-Host "Directory $WinPE_amd64 has been removed successfully."
} else {
Write-Host "Path $WinPE_amd64 does not exist. No action required."
}
Starts the Deployment and Imaging Tools Environment.
Creates the skeleton WinPE files at C:\WinPE_amd64.
The path to DandISetEnv.bat was found by:
1. Typing in "Deployment and Imaging Tools Environment" in the Windows search box.
2. Right click on Deployment and Imaging Tools Environment.
3. Click on Open file location.
4. Right click on the file Deployment and Imaging Tools Environment.
5. Click Properties.
6. Look at the path in the Target field.
Use call to run multiple commands after running the batch file DandISetEnv.bat. Referenced from https://superuser.com/questions/1079403/how-to-run-multiple-commands-one-after-another-in-cmd.
Execute the following script:
call "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\DandISetEnv.bat" dir
copype amd64 {automationWorkerWindowsBaseDirectory}\WinPE_amd64
Overwrites this default efisys.bin created by the Windows Assessment and Deployment Kit:
* C:\WinPE_amd64\fwfiles\efisys.bin - which prompts the user to "Press any key To boot from CD or DVD . . . ." for UEFI boots methods.
with the efisys_noprompt.bin file from Win2019 DVD ISO:
* C:\attuneautomationworker\build-winpe-iso\winimg\efi\microsoft\boot\efisys_noprompt.bin - which does not have the "Press any key To boot from CD or DVD . . . ." prompt for UEFI boot methods.
After this step WinPE ISOs built with a copy of the skeleton WinPE directory C:\WinPE_amd64 will not prompt for the "Press any key To boot from CD or DVD . . . ." for UEFI boots methods.
Execute the following script:
$SKELETON_FWFILES_PATH="{automationWorkerWindowsBaseDirectory}\WinPE_amd64\fwfiles"
Set-Location "${SKELETON_FWFILES_PATH}"
$WinPE_amd64_PATH="{automationWorkerWindowsBaseDirectory}\build-winpe-iso\WinPE_amd64"
Write-Host "Before hash of efisys.bin"
Get-FileHash .\efisys.bin
Copy-Item `
-Path "{automationWorkerWindowsBaseDirectory}\build-winpe-iso\winimg\efi\microsoft\boot\efisys_noprompt.bin" `
-Destination ".\efisys.bin"
Write-Host "After hash of efisys.bin"
Get-FileHash .\efisys.bin
You have completed this instruction.
Join our Discord channel and connect with like-minded individuals who share your passion. Engage in lively discussions, gain valuable insights, and stay updated on the latest trends in our industry. Don't miss out on this opportunity to network, learn, and grow together.
Click the link below and become a part of our vibrant community on Discord today!