From c24ea5e53bec8f85f5b68ceb1f16881d73962a6d Mon Sep 17 00:00:00 2001 From: Gabi <218829269+GabiNun2@users.noreply.github.com> Date: Tue, 7 Apr 2026 18:46:11 +0300 Subject: [PATCH] Update Invoke-WinUtilISO.ps1 (#4314) --- functions/private/Invoke-WinUtilISO.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/private/Invoke-WinUtilISO.ps1 b/functions/private/Invoke-WinUtilISO.ps1 index 0b2d769e..3f1b1fbf 100644 --- a/functions/private/Invoke-WinUtilISO.ps1 +++ b/functions/private/Invoke-WinUtilISO.ps1 @@ -540,6 +540,9 @@ function Invoke-WinUtilISOExport { if (-not $oscdimg) { Write-Win11ISOLog "oscdimg.exe not found. Attempting to install via winget..." try { + # First ensure winget is installed and operational + Install-WinUtilWinget + $winget = Get-Command winget -ErrorAction Stop $result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1 Write-Win11ISOLog "winget output: $result"