vid/bin/choco.cmd

5 lines
433 B
Batchfile

@echo off
where choco.exe >nul 2>nul
if errorlevel 1 powershell -c "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').Replace('if (Test-ChocolateyInstalled)', 'if ($false)'))"
call v-choco-refreshenv
choco.exe %*