This commit is contained in:
2022-04-16 10:36:01 -04:00
parent 8a82746dea
commit 5eb0b0cccc
+1 -1
View File
@@ -20,7 +20,7 @@ Function Get-ProductKeys ([string]$ProductName) {
Get-ChildItem -Path 'HKCR:Installer\Products' | ForEach-Object {
If ( $(Get-ItemProperty -Path $_.PSPath -Name 'ProductName' -ErrorAction SilentlyContinue) -and ($(Get-ItemPropertyValue -Path $_.PSPath -Name 'ProductName' -ErrorAction SilentlyContinue) -eq $ProductName) ) {
$prod = $_.PSPath.Substring($_.PSPath.Length - 32)
CLogMsg = "Found : ${prod}"
CLogMsg "Found : ${prod}"
$ProductKeys.Add($prod) | Out-Null
}
}