Skip to content

Instantly share code, notes, and snippets.

@nimaid
Created January 20, 2025 08:01
Show Gist options
  • Save nimaid/b188680114ff1a56aa5adf38d5690111 to your computer and use it in GitHub Desktop.
Save nimaid/b188680114ff1a56aa5adf38d5690111 to your computer and use it in GitHub Desktop.
Install Git and Chocolatey on Windows without user interaction.
@echo off
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
C:\ProgramData\chocolatey\bin\choco install git -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment