Created
September 20, 2024 15:46
-
-
Save ayhaadam/976df99b3c96ddc1aea3037d81719296 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@echo off | |
:: 安裝 Chocolatey | |
where choco >nul 2>nul | |
if %errorlevel% neq 0 ( | |
echo Installing Chocolatey... | |
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" | |
:: 重新載入 PATH 變數 | |
for /f "tokens=2 delims==" %%A in ('setx /m Path') do ( | |
set "Path=%%A;%Path%" | |
) | |
) | |
:: 安裝其他程式 | |
set programs=notion slack asana avastfreeantivirus | |
for %%p in (%programs%) do ( | |
echo Installing %%p... | |
choco install %%p -y | |
) | |
echo done | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment