name: Image Investigation on: workflow_dispatch # Запуск вручную jobs: investigate: name: Explore Windows 2025 Image runs-on: windows-2025-vs2026 steps: - name: System Inventory shell: pwsh run: | # 1. Все переменные окружения Write-Host "--- ENVIRONMENT VARIABLES ---" -ForegroundColor Cyan Get-ChildItem Env: | Sort-Object Name | ForEach-Object { "$($_.Name)=$($_.Value)" } # 2. Глубокое сканирование Program Files (Глубина 3) Write-Host "`n--- DIRECTORY TREE: PROGRAM FILES ---" -ForegroundColor Cyan $roots = @($env:ProgramFiles, ${env:ProgramFiles(x86)}) foreach ($root in $roots) { if (Test-Path $root) { Write-Host "`n[ Root: $root ]" -ForegroundColor Yellow # Depth 2 дает нам 3 уровня (0 - корень, 1 - подпапка, 2 - под-подпапка) Get-ChildItem -Path $root -Directory -Depth 2 -ErrorAction SilentlyContinue | Select-Object @{Name="Depth"; Expression={$_.FullName.Replace($root, "").Split('\').Count - 1}}, FullName | Sort-Object FullName | ForEach-Object { " " * $_.Depth + $_.FullName } } } # 3. Поиск Visual Studio 2026 (через vswhere) Write-Host "`n--- VISUAL STUDIO LOCATIONS (vswhere) ---" -ForegroundColor Cyan if (Get-Command vswhere -ErrorAction SilentlyContinue) { vswhere -latest -property installationPath } else { Write-Host "vswhere not found in PATH" -ForegroundColor Red }