mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-18 02:58:30 +00:00
Update Invoke-WinUtilISO.ps1 (#4314)
This commit is contained in:
@@ -540,6 +540,9 @@ function Invoke-WinUtilISOExport {
|
|||||||
if (-not $oscdimg) {
|
if (-not $oscdimg) {
|
||||||
Write-Win11ISOLog "oscdimg.exe not found. Attempting to install via winget..."
|
Write-Win11ISOLog "oscdimg.exe not found. Attempting to install via winget..."
|
||||||
try {
|
try {
|
||||||
|
# First ensure winget is installed and operational
|
||||||
|
Install-WinUtilWinget
|
||||||
|
|
||||||
$winget = Get-Command winget -ErrorAction Stop
|
$winget = Get-Command winget -ErrorAction Stop
|
||||||
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1
|
$result = & $winget install -e --id Microsoft.OSCDIMG --accept-package-agreements --accept-source-agreements 2>&1
|
||||||
Write-Win11ISOLog "winget output: $result"
|
Write-Win11ISOLog "winget output: $result"
|
||||||
|
|||||||
Reference in New Issue
Block a user