????# post_bootpack_pointer_refresh_v1.0.4.ps1 - refresh pointer + optional acceptance (non-interactive) param( [Parameter(Mandatory=$true)][string]$Root, [switch]$NoPrompt, [switch]$Verify ) try{ [Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false) }catch{} $scripts = Join-Path $Root 'scripts' $ptr = Join-Path $scripts 'kb_pointer_refresh_v1.0.1.ps1' $acc = Join-Path $scripts 'kb_acceptance_tests_v1.0.1.ps1' function Exists([string]$p){ return (-not [string]::IsNullOrWhiteSpace($p)) -and (Test-Path -LiteralPath $p) } function Run([string]$tool,[string[]]$argv){ $null = & powershell -NoProfile -ExecutionPolicy Bypass -File $tool @argv; return [int]$LASTEXITCODE } if(-not (Exists $ptr)){ Write-Host "[ERROR] missing: $ptr"; exit 3 } # 1) refresh pointer (force write, non-interactif) $rc = Run $ptr @('-RegistryRoot',$Root,'-Write') if($rc -ne 0){ Write-Host ("[ERROR] pointer refresh rc={0}" -f $rc); exit 3 } # 2) acceptance (optionnelle) if($Verify -and (Exists $acc)){ $rc = Run $acc @($Root) if($rc -ne 0){ Write-Host ("[FAIL] acceptance rc={0}" -f $rc); exit 2 } } Write-Host "[OK] post_bootpack_pointer_refresh done." exit 0