Line 982+ of MSFT_xPackageresource.psm1:
if($Ensure -eq "Present")
{
$productEntry = Get-ProductEntry $Name $identifyingNumber $InstalledCheckRegHive $InstalledCheckRegKey $InstalledCheckRegValueName $InstalledCheckRegValueData
if(-not $productEntry)
{
Throw-TerminatingError ($LocalizedData.PostValidationError -f $OrigPath)
}
}
This happens immediately after the package has installed. Whether a reboot has been requested or not. Some packages do not complete their installation until after a reboot. An example is .Net 4.6.1. The registry keys that one can use to determine whether it is installed or not do not actually appear until after the reboot.
So, xPackage fails. Even though it has succeeded. There needs to be some way to avoid this, allowing the reboot to proceed, and reevaluation to occur when it comes back up.
Line 982+ of
MSFT_xPackageresource.psm1:This happens immediately after the package has installed. Whether a reboot has been requested or not. Some packages do not complete their installation until after a reboot. An example is .Net 4.6.1. The registry keys that one can use to determine whether it is installed or not do not actually appear until after the reboot.
So, xPackage fails. Even though it has succeeded. There needs to be some way to avoid this, allowing the reboot to proceed, and reevaluation to occur when it comes back up.