Skip to content

Instantly share code, notes, and snippets.

View mjfusa's full-sized avatar

Mike Francis mjfusa

  • Microsoft
  • Issaquah, WA
View GitHub Profile
@mjfusa
mjfusa / installchoco.cmd
Last active December 5, 2018 23:19
Chocolatey Install for new PC
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto continue
) else ( powershell "saps -filepath %0 -verb runas" >nul 2>&1)
exit /b
:continue
cd %~dp0
powershell Set-ExecutionPolicy bypass -force
powershell -f setpath.ps1
powershell Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))