@@ -409,26 +409,21 @@ Write-Host "The tiny11 image is now completed. Proceeding with the making of the
409409Write-Host " Copying unattended file for bypassing MS account on OOBE..."
410410Copy-Item - Path " $PSScriptRoot \autounattend.xml" - Destination " $ScratchDisk \tiny11\autounattend.xml" - Force > null
411411Write-Host " Creating ISO image..."
412- # Define the path to the ADK Deployment Tools folder
413412$ADKDepTools = " C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\$hostarchitecture \Oscdimg"
414413$localOSCDIMGPath = " $PSScriptRoot \oscdimg.exe"
415414
416- # Check if the ADK Deployment Tools folder exists
417415if ([System.IO.Directory ]::Exists($ADKDepTools )) {
418416 Write-Host " Will be using oscdimg.exe from system ADK."
419417 $OSCDIMG = " $ADKDepTools \oscdimg.exe"
420418} else {
421419 Write-Host " ADK folder not found. Will be using bundled oscdimg.exe."
422420
423- # Define the URL of the file to be downloaded
424421 $url = " https://msdl.microsoft.com/download/symbols/oscdimg.exe/3D44737265000/oscdimg.exe"
425422
426- # Download oscdimg.exe if it doesn't exist in the script's directory
427423 if (-not (Test-Path - Path $localOSCDIMGPath )) {
428424 Write-Host " Downloading oscdimg.exe..."
429425 Invoke-WebRequest - Uri $url - OutFile $localOSCDIMGPath
430426
431- # Check if the download was successful
432427 if (Test-Path $localOSCDIMGPath ) {
433428 Write-Host " oscdimg.exe downloaded successfully."
434429 } else {
@@ -442,7 +437,6 @@ if ([System.IO.Directory]::Exists($ADKDepTools)) {
442437 $OSCDIMG = $localOSCDIMGPath
443438}
444439
445- # Execute oscdimg.exe with the specified parameters
446440& " $OSCDIMG " ' -m' ' -o' ' -u2' ' -udfver102' " -bootdata:2#p0,e,b$ScratchDisk \tiny11\boot\etfsboot.com#pEF,e,b$ScratchDisk \tiny11\efi\microsoft\boot\efisys.bin" " $ScratchDisk \tiny11" " $PSScriptRoot \tiny11.iso"
447441
448442# Finishing up
0 commit comments