diff --git a/setup.ps1 b/setup.ps1 index 22a5303..2ffadf9 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -1,4 +1,4 @@ -# ============================================================ +# ============================================================ # Skript ustanovki programm # Zapusk: irm https://git.help-d.ru/helmut/auto-turning/raw/branch/main/setup.ps1 | iex # ============================================================ @@ -94,7 +94,7 @@ foreach ($prog in $programList) { Write-Host "`n a - ALL programs" -ForegroundColor Green Write-Host " 0 - Cancel`n" -ForegroundColor Gray -$choice = Read-Host "Select (numbers separated by space, or a)" +$choice = Read-Host "Select (1 2 3 or 1,2,3 or a)" if ($choice -eq "0") { Write-Host "Canceled" -ForegroundColor Red @@ -105,7 +105,9 @@ $selectedPrograms = @() if ($choice -eq "a") { $selectedPrograms = $allPrograms } else { - foreach ($num in ($choice -split '\s+') | Where-Object { $_ -match '^\d+$' }) { + # Поддержка: "1, 2, 3" или "1 2 3" или "1,2,3" + $normalized = $choice -replace ',', ' ' + foreach ($num in ($normalized -split '\s+') | Where-Object { $_ -match '^\d+$' }) { if ($progMap[[int]$num]) { $selectedPrograms += $progMap[[int]$num] }