mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
Fix mount disk error (#4204)
* wait for mounting to assign disk letter * update * Gabi fixing my slop with a comment
This commit is contained in:
@@ -49,8 +49,13 @@ function Invoke-WinUtilISOMountAndVerify {
|
|||||||
Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10
|
Set-WinUtilProgressBar -Label "Mounting ISO..." -Percent 10
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$diskImage = Mount-DiskImage -ImagePath $isoPath -PassThru -ErrorAction Stop
|
Mount-DiskImage -ImagePath $isoPath -ErrorAction Stop | Out-Null
|
||||||
$driveLetter = ($diskImage | Get-Volume).DriveLetter + ":"
|
|
||||||
|
do {
|
||||||
|
Start-Sleep -Milliseconds 500
|
||||||
|
} until ((Get-DiskImage -ImagePath $isoPath | Get-Volume).DriveLetter)
|
||||||
|
|
||||||
|
$driveLetter = (Get-DiskImage -ImagePath $isoPath | Get-Volume).DriveLetter + ":"
|
||||||
Write-Win11ISOLog "Mounted at drive $driveLetter"
|
Write-Win11ISOLog "Mounted at drive $driveLetter"
|
||||||
|
|
||||||
Set-WinUtilProgressBar -Label "Verifying ISO contents..." -Percent 30
|
Set-WinUtilProgressBar -Label "Verifying ISO contents..." -Percent 30
|
||||||
|
|||||||
Reference in New Issue
Block a user