??function Get-ProjectProfile { # PS 5.1-safe: fiabilise le chemin du script $here = $PSScriptRoot if(-not $here){ $here = Split-Path -Parent $MyInvocation.MyCommand.Path } $registry = Split-Path -Parent $here $bp = Join-Path $registry 'bootpack\bootpack.txt' if(-not (Test-Path -LiteralPath $bp)){ return 'HUB' } # d?faut prudent $raw = Get-Content -LiteralPath $bp -Raw -Encoding UTF8 $m = [regex]::Match($raw,'(?mi)^\s*PROJECT\s*:\s*(.+)$') $proj = '' if($m.Success){ $proj = $m.Groups[1].Value.Trim().ToUpper() } if($proj -like 'SEEDBOX*'){ return 'SEEDBOX' } else { return 'HUB' } }