diff --git a/scripts/02-software.ps1 b/scripts/02-software.ps1 index 3385db3..a74af8b 100644 --- a/scripts/02-software.ps1 +++ b/scripts/02-software.ps1 @@ -142,6 +142,11 @@ if (Get-Feature $Config "software" "pdfDefault") { } else { Write-Log " Found: $acroExe" -Level INFO + # Mount HKCR PSDrive - not available by default in PS sessions + if (-not (Get-PSDrive -Name HKCR -ErrorAction SilentlyContinue)) { + New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null + } + # Set file type association via HKCR (system-wide, requires admin) $progId = "AcroExch.Document.DC" $openCmd = "`"$acroExe`" `"%1`""