Last active
March 9, 2023 15:28
-
-
Save wincmd64/aa680b1ece5e049b37ddae001e12df5e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Авто-установка chocolatey и софта | |
# Использование: powershell -ExecutionPolicy Bypass -File "choco.ps1" | |
# https://t.me/wincmd64 | |
# ps ver check | |
if ($PSversiontable.psversion -lt "5.1") { | |
Write-Host "POWERSHELL UPDATE NEEDED -- https://microsoft.com/download/details.aspx?id=54616" | |
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown'); | |
exit | |
} | |
# choco check | |
if(-not(Get-Command choco -ErrorAction SilentlyContinue)) { | |
Write-Host "INSTALL CHOCO?" -ForegroundColor Red | |
pause | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) | |
} else { | |
choco list --localonly | |
} | |
Write-Host "INSTALL SOFT?" -ForegroundColor Red | |
pause | |
choco install 7zip -y | |
if ([System.Environment]::OSVersion.Version.ToString(2) -eq "10.0") { | |
# win 10+ | |
choco install vcredist140 -y | |
} elseif ([System.Environment]::OSVersion.Version.ToString(2) -eq "6.1") { | |
# win 7 | |
choco install firefoxesr -y | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment