Skip to content

Instantly share code, notes, and snippets.

@stuaxo stuaxo/setup-windows.cmd
Last active Oct 4, 2017

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= & 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 (
) 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
You can’t perform that action at this time.