vid/bin/choco.cmd

7 lines
447 B
Batchfile
Raw Permalink Normal View History

2022-03-03 01:06:57 +08:00
@echo off
where choco.exe >nul 2>nul
2022-03-05 14:25:10 +08:00
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
)
2022-03-03 01:06:57 +08:00
choco.exe %*