Skip to content

Commit 0978daa

Browse files
committed
Adding SKU validation
PR: ntdevlabs#338
1 parent 4d8268e commit 0978daa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tiny11maker.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ Start-Sleep -Seconds 2
9090
Clear-Host
9191
Write-Host "Getting image information:"
9292
Get-WindowsImage -ImagePath $ScratchDisk\tiny11\sources\install.wim
93-
$index = Read-Host "Please enter the image index"
93+
94+
$index = Read-Host "Please enter the image index : "
95+
$ImagesIndex = (Get-WindowsImage -ImagePath $ScratchDisk\tiny11\sources\install.wim).ImageIndex
96+
while ($ImagesIndex -notcontains $index) {
97+
$index = Read-Host "Please enter a valide image index : "
98+
}
99+
94100
Write-Host "Mounting Windows image. This may take a while."
95101
$wimFilePath = "$ScratchDisk\tiny11\sources\install.wim"
96102
& takeown "/F" $wimFilePath

0 commit comments

Comments
 (0)