Update files

Updated the Test-CompatibleImage function to compare against a desired version, which is useful for determining if the Specialize pass needs to be added to the unattended answer file
This commit is contained in:
CodingWonders
2024-02-09 20:03:05 +01:00
parent 42d13ad735
commit 2fbe40a3ee
3 changed files with 62 additions and 32 deletions

View File

@ -60,7 +60,7 @@ public class PowerManagement {
$imgVersion = (Get-WindowsImage -ImagePath $mountDir\sources\install.wim -Index $index).Version
# Detect image version to avoid performing MicroWin processing on Windows 8 and earlier
if ((Test-CompatibleImage $imgVersion) -eq $false)
if ((Test-CompatibleImage $imgVersion $([System.Version]::new(10,0,10240,0))) -eq $false)
{
$msg = "This image is not compatible with MicroWin processing. Make sure it isn't a Windows 8 or earlier image."
$dlg_msg = $msg + "`n`nIf you want more information, the version of the image selected is $($imgVersion)`n`nIf an image has been incorrectly marked as incompatible, report an issue to the developers."