I have a number of machines and like to mess about testing VM's as well... So I have this script to install most of the software I want on a new machine running windows utilizing winget. Been adding programs to this as I think of it... if anyone has any other good ideas for programs to add do let me know? Curious if any of y'all have attempted to streamline installing software on a fresh install?
@echo off
setlocal enabledelayedexpansion
:: List of application IDs
set apps=Microsoft.WindowsTerminal.Preview Microsoft.PowerToys VideoLAN.VLC Mozilla.Firefox brave.brave Spotify.Spotify PrimateLabs.Geekbench.6 Audacity.Audacity CPUID.HWMonitor TheDocumentFoundation.LibreOffice
for %%A in (%apps%) do (
echo ---------------------------------------
echo Processing %%A...
:: Check if the app is installed by capturing the list output
winget list --id %%A > temp_check.txt 2>&1
findstr /C:"No installed package found" temp_check.txt >nul
if !errorlevel! equ 0 (
echo %%A not installed. Installing...
winget install --id %%A --silent --accept-source-agreements --accept-package-agreements
) else (
echo %%A is installed. Attempting upgrade...
winget upgrade --id %%A --silent --accept-source-agreements --accept-package-agreements
if !errorlevel! neq 0 (
echo Upgrade failed for %%A or no update available.
)
)
echo.
)
del temp_check.txt >nul 2>&1
endlocal