× Search About Posts Code Music Links
Blank Try
experiment
lots
learn
more

Choco Batch File

Updated on
Last site update: 8 May 2024

Copy & paste the following into a batch file (a file with a .bat extension).

Edit the line 47 to pick the programs you want.

Run the batch file from a terminal with admin rights.

 1echo OFF
 2
 3NET SESSION >nul 2>&1
 4
 5IF %ERRORLEVEL% EQU 0 (
 6
 7   echo.
 8
 9) ELSE (
10
11   echo.-------------------------------------------------------------
12
13   echo ERROR: YOU ARE NOT RUNNING THIS WITH ADMINISTRATOR PRIVILEGES.
14
15   echo. -------------------------------------------------------------
16
17   echo. If you're seeing this, it means you don't have admin privileges!
18
19   pause
20
21   echo.
22
23   echo. You will need to restart this program with Administrator privileges by right-clicking and select "Run As Administrator"
24
25   pause 
26
27    echo.
28
29   echo Press any key to leave this program. Make sure to Run As Administrator next time!
30
31   pause
32
33   EXIT /B 1
34
35)
36
37
38powershell -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
39
40choco feature enable -n=allowGlobalConfirmation
41
42echo Chocolatey is ready to begin installing packages!
43
44pause
45
46
47choco install brave curl edgedeflector git golang hugo-extended irfanview irfanviewplugins keepass keepass-plugin-favicon keepass-plugin-keetheme lunacy mpc-hc-clsid2 nodejs-lts obsidian qbittorrent signal thunderbird vscode vscode-markdown-all-in-one wget -y
48
49pause
50echo.
51echo Your installation is complete.
52pause