Skip to content

Instantly share code, notes, and snippets.

@t1m0thyj
Created December 3, 2020 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save t1m0thyj/dc2356a1a6d490c0db92db0594ef570a to your computer and use it in GitHub Desktop.
Save t1m0thyj/dc2356a1a6d490c0db92db0594ef570a to your computer and use it in GitHub Desktop.
@echo off
SET DIR=%temp%
::download install.ps1
%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "((new-object net.webclient).DownloadFile('https://chocolatey.org/install.ps1','%DIR%install.ps1'))"
::run installer
%systemroot%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& '%DIR%install.ps1' %*"
call C:\ProgramData\chocolatey\bin\RefreshEnv.cmd
@echo on
choco install -y %*
call C:\ProgramData\chocolatey\bin\RefreshEnv.cmd
@echo on
cd C:\Users\WDAGUtilityAccount\Desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment