Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Install various packages I use with windows
@echo off
:: Paste the next line in an admin prompt to install packages (at your own risk!)
:: cmd /V:on /C "set url=https://gist.githubusercontent.com/stuaxo/84480ee204a203002f59b68ffbfe82f9/raw & set batchfile=!temp!\install-packages-!RANDOM!.cmd & bitsadmin /transfer getbat /download /priority normal !url! !batchfile! & call !batchfile! & del !batchfile!"
@setlocal EnableDelayedExpansion
set packages=
for %%a in (
7zip.install
conemu
msys2-installer
python3
) do set packages=!packages! %%~a
:: check is administrator
net session >nul 2>&1 || if not !errorlevel! == 0 (echo Not running as admin & exit /b)
:: install packages
choco install -y !packages!
call refreshenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment